diff --git a/src/shared/app.tsx b/src/shared/app.tsx index 2305485..a0d30a8 100644 --- a/src/shared/app.tsx +++ b/src/shared/app.tsx @@ -1,7 +1,7 @@ import { Switch } from "onefx/lib/react-router"; import { Route } from "onefx/lib/react-router-dom"; import { styled } from "onefx/lib/styletron-react"; -import React, { useEffect, useState } from "react"; +import React, { useEffect } from "react"; import { FOOTER_ABOVE, Footer } from "@/shared/common/footer"; import { Head } from "@/shared/common/head"; import { NotFound } from "@/shared/common/not-found"; @@ -9,10 +9,6 @@ import { ScrollToTop } from "@/shared/common/scroll-top"; import { fonts } from "@/shared/common/styles/style-font"; import { TopBar } from "@/shared/common/top-bar"; import { Home } from "@/shared/home/home"; -import { - asyncWithLDProvider, - useLDClient, -} from "launchdarkly-react-client-sdk"; import { FlagsStatusTableController } from "./feature-flags/flags-status-table-controller"; import { FlagDetailsController } from "./flag-details/flag-details-controller"; @@ -22,47 +18,6 @@ type Props = { googleTid: string; }; -export function App(props: Props): JSX.Element { - const [LDProvider, setFlagsLoaded] = useState(null); - const ldClient = useLDClient(); - useEffect(() => { - initGoogleAnalytics({ tid: props.googleTid }); - (async () => { - try { - const Provider = await asyncWithLDProvider({ - clientSideID: "your-client-side-id", - user: { - key: "aa0ceb", - name: "Grace Hopper", - email: "gracehopper@example.com", - }, - options: { - baseUrl: "https://stargately.com", - eventsUrl: "https://stargately.com", - streaming: false, - }, - }); - - await ldClient?.identify({ key: "aa0ceb" }); - - setFlagsLoaded(() => Provider); - } catch (e) { - console.log("failed to load flags", e); - } - })(); - }, []); - - if (LDProvider) { - return ( - - - - ); - } - - return ; -} - const RootStyle = styled("div", ({ $theme }) => ({ ...fonts.body, backgroundColor: $theme?.colors.black10, @@ -70,28 +25,33 @@ const RootStyle = styled("div", ({ $theme }) => ({ textRendering: "optimizeLegibility", })); -const Inner: React.FC = () => ( - - - -
- - - - - - - - - - - - - - - - -
-