From ec00e3ba25dbce5fd61212ed7288879554b3fa00 Mon Sep 17 00:00:00 2001 From: Alevo Date: Mon, 20 Feb 2023 17:19:46 +0100 Subject: [PATCH 1/2] Added livecycle --- package.json | 1 + src/index.tsx | 4 ++++ 2 files changed, 5 insertions(+) diff --git a/package.json b/package.json index 7fcce60..4c27c58 100644 --- a/package.json +++ b/package.json @@ -15,6 +15,7 @@ "@emotion/react": "^11.10.5", "@emotion/styled": "^11.10.5", "@fontsource/roboto": "^4.5.8", + "@livecycle/sdk": "^0.1.11", "@mui/icons-material": "^5.10.14", "@mui/material": "^5.10.14", "@tanstack/react-query": "^4.16.1", diff --git a/src/index.tsx b/src/index.tsx index 6634c3c..a8f2ebc 100644 --- a/src/index.tsx +++ b/src/index.tsx @@ -11,6 +11,10 @@ import "@fontsource/roboto/400.css"; import "@fontsource/roboto/500.css"; import "@fontsource/roboto/700.css"; +import LivecycleSdk from '@livecycle/sdk' + +LivecycleSdk.init() + const root = ReactDOM.createRoot( document.getElementById("root") as HTMLElement ); From f71f4e0c508bfe72ddcbee7df01b66fcbb0cfa4e Mon Sep 17 00:00:00 2001 From: Alevo Date: Mon, 20 Feb 2023 17:30:45 +0100 Subject: [PATCH 2/2] Integrated with vercel --- src/App.tsx | 6 ++++++ src/index.tsx | 4 ---- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/src/App.tsx b/src/App.tsx index 07d4379..50ec9ec 100644 --- a/src/App.tsx +++ b/src/App.tsx @@ -8,6 +8,8 @@ import { MapProvider } from "@contexts/MapContext"; import { QueryClient, QueryClientProvider } from "@tanstack/react-query"; import { UsersProvider } from "@contexts/UsersContext"; import { SnackbarProvider } from "notistack"; +import LivecycleSDK from '@livecycle/sdk'; +import { useEffect } from "react"; const queryClient = new QueryClient({ defaultOptions: { @@ -18,6 +20,10 @@ const queryClient = new QueryClient({ }); function App() { + useEffect(() => { + LivecycleSDK.init().catch(console.error) + }, []) + return ( diff --git a/src/index.tsx b/src/index.tsx index a8f2ebc..6634c3c 100644 --- a/src/index.tsx +++ b/src/index.tsx @@ -11,10 +11,6 @@ import "@fontsource/roboto/400.css"; import "@fontsource/roboto/500.css"; import "@fontsource/roboto/700.css"; -import LivecycleSdk from '@livecycle/sdk' - -LivecycleSdk.init() - const root = ReactDOM.createRoot( document.getElementById("root") as HTMLElement );