Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(STATFLO-1093): adjustments will preparing demo #19

Merged
merged 1 commit into from
Oct 11, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file modified docs/public/favicon.ico
Binary file not shown.
3 changes: 1 addition & 2 deletions docs/public/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,9 @@
<meta name="theme-color" content="#000000" />
<meta
name="description"
content="Web site created using create-react-app"
content="Statflo's widget playground"
/>
<link rel="stylesheet" href="https://cdn.statflo.com/brandon/brandon.css" />
<link rel="apple-touch-icon" href="%PUBLIC_URL%/logo192.png" />
<!--
manifest.json provides metadata used when your web app is installed on a
user's mobile device or desktop. See https://developers.google.com/web/fundamentals/web-app-manifest/
Expand Down
Binary file removed docs/public/logo192.png
Binary file not shown.
Binary file removed docs/public/logo512.png
Binary file not shown.
14 changes: 2 additions & 12 deletions docs/public/manifest.json
Original file line number Diff line number Diff line change
@@ -1,21 +1,11 @@
{
"short_name": "React App",
"name": "Create React App Sample",
"short_name": "Widget Playground",
"name": "Widget Playground",
"icons": [
{
"src": "favicon.ico",
"sizes": "64x64 32x32 24x24 16x16",
"type": "image/x-icon"
},
{
"src": "logo192.png",
"type": "image/png",
"sizes": "192x192"
},
{
"src": "logo512.png",
"type": "image/png",
"sizes": "512x512"
}
],
"start_url": ".",
Expand Down
3 changes: 3 additions & 0 deletions docs/src/components/RemoteComponent.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import { UseBoundStore } from "zustand/react";
import { Mutate, StoreApi } from "zustand/vanilla";

import { Widget, WidgetState } from "@statflo/widget-sdk";
import usePublishMainWidgetEvents from "../hooks/usePublishMainWidgetEvents";

type WidgetProps = {
widget: Widget;
Expand Down Expand Up @@ -42,6 +43,8 @@ export const RemoteComponent: FC<WidgetProps> = ({
const events = store((state) => state.events);
const [loading, setLoading] = useState(true);

usePublishMainWidgetEvents(loading);

const onLoad = (e: any) => {
// Populate Iframe widgets with any events they may have missed before loading
const iframe = document.getElementById(widget.id) as HTMLIFrameElement;
Expand Down
Loading
Loading