From b1d68ac307ed87d63e83820cbdf843fff0fd9f7f Mon Sep 17 00:00:00 2001 From: polwex Date: Thu, 11 Sep 2025 01:48:14 +0700 Subject: init --- front/src/App.tsx | 43 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 43 insertions(+) create mode 100644 front/src/App.tsx (limited to 'front/src/App.tsx') diff --git a/front/src/App.tsx b/front/src/App.tsx new file mode 100644 index 0000000..60ca66a --- /dev/null +++ b/front/src/App.tsx @@ -0,0 +1,43 @@ +import { useEffect, useState } from "react"; +import useLocalState from "@/state/state"; +import Router from "./Router"; +import "@/styles/styles.css"; +import { ThemeProvider } from "@/styles/ThemeProvider"; +import spinner from "@/assets/crowspinner.gif"; + +import { QueryClient, QueryClientProvider } from "@tanstack/react-query"; +import { Toaster } from "react-hot-toast"; +const queryClient = new QueryClient(); + +// const isMobile = MOBILE_BROWSER_REGEX.test(navigator.userAgent); + +function App() { + const [loading, setLoading] = useState(true); + console.log("NOSTRIL INIT"); + const { init, modal } = useLocalState(); + useEffect(() => { + init().then((_res: any) => { + setLoading(false); + }); + }, []); + if (loading) + return ( +
+ +

Syncing with your Urbit...

+
+ ); + else + return ( + + + {/* {isMobile ? : } */} + + {modal && modal} + + + + ); +} + +export default App; -- cgit v1.2.3