diff --git a/examples/linearlite/src/App.tsx b/examples/linearlite/src/App.tsx index de86fced55..788a4157ae 100644 --- a/examples/linearlite/src/App.tsx +++ b/examples/linearlite/src/App.tsx @@ -56,11 +56,6 @@ pgPromise.then(async (pg) => { }) }) -let resolveFirstLoaderPromise: (value: void | PromiseLike) => void -const firstLoaderPromise = new Promise((resolve) => { - resolveFirstLoaderPromise = resolve -}) - async function issueListLoader({ request }: { request: Request }) { await waitForInitialSyncDone() const pg = await pgPromise @@ -74,7 +69,6 @@ async function issueListLoader({ request }: { request: Request }) { offset: 0, limit: 100, }) - resolveFirstLoaderPromise() return { liveIssues, filterState } } @@ -178,19 +172,11 @@ const App = () => { const [pgForProvider, setPgForProvider] = useState(null) const [syncStatus, syncMessage] = useSyncStatus() - const [firstLoaderDone, setFirstLoaderDone] = useState(false) useEffect(() => { pgPromise.then(setPgForProvider) }, []) - useEffect(() => { - if (firstLoaderDone) return - firstLoaderPromise.then(() => { - setFirstLoaderDone(true) - }) - }, [firstLoaderDone]) - const menuContextValue = useMemo( () => ({ showMenu, setShowMenu }), [showMenu] @@ -207,8 +193,6 @@ const App = () => { ) - if (!firstLoaderDone) return Loading... - return (