Skip to content

Commit

Permalink
Merge pull request #19 from Statflo/STATFLO-1093
Browse files Browse the repository at this point in the history
feat(STATFLO-1093): adjustments will preparing demo
  • Loading branch information
Emgem authored Oct 11, 2023
2 parents fab29a1 + a186551 commit ba41ef4
Show file tree
Hide file tree
Showing 18 changed files with 936 additions and 1,663 deletions.
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

0 comments on commit ba41ef4

Please sign in to comment.