import Test from "./test"; import Cookies from "./cookies/Cookies"; import spinner from "./assets/icons/spinner.svg"; import "./App.css"; import "./thai.css"; import Loader from "./timeline/Entry"; import Modal from "./modals/Modal"; import { useGlobalState } from "./logic/state"; import { useEffect, useState } from "react"; import { useHistory, Router, Route } from "./logic/router"; import { useQueryClient } from "@tanstack/react-query"; import { twatterCookieQ } from "./logic/queries"; import { PROCESS_ID } from "./logic/constants"; function App() { const [loading, setLoading] = useState(true); const { init, modal } = useGlobalState(); const qc = useQueryClient(); async function pref() { await qc.prefetchQuery(twatterCookieQ); } useEffect(() => { init().then((_) => { setLoading(false); }); pref(); }, []); // const { init } = useGlobalState(); if (loading) return ; return ( <> {modal && {modal}} ); } function Nav() { const { navigate } = useHistory(); return ( <>

TwitTok

navigate("/cookies")} className="button"> Set Cookies navigate("/main")} className="button"> Go Browse ); } export default App;