diff options
author | Ansh <anshnanda10@gmail.com> | 2023-09-15 22:02:44 +0530 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-09-15 09:32:44 -0700 |
commit | 188d4893f9f209aae10294bf72fe9f23ed399c28 (patch) | |
tree | b87f291ff3f796d51578fd9f2e68e3311c8e74c2 /src/App.web.tsx | |
parent | 84b7edd9db4bb08f03b5c882da5542fc29a72232 (diff) | |
download | voidsky-188d4893f9f209aae10294bf72fe9f23ed399c28.tar.zst |
add React Query and hook up to existing functionality (#1358)
* add React Query and hook up to existing functionality * wire in remote data, add error message * remove hard-coded feeds * oops fix logic * add loading state * fix loading on mobile --------- Co-authored-by: Eric Bailey <git@esb.lol>
Diffstat (limited to 'src/App.web.tsx')
-rw-r--r-- | src/App.web.tsx | 28 |
1 files changed, 16 insertions, 12 deletions
diff --git a/src/App.web.tsx b/src/App.web.tsx index 41a7189d3..a9123cc58 100644 --- a/src/App.web.tsx +++ b/src/App.web.tsx @@ -9,6 +9,8 @@ import {Shell} from './view/shell/index' import {ToastContainer} from './view/com/util/Toast.web' import {ThemeProvider} from 'lib/ThemeContext' import {observer} from 'mobx-react-lite' +import {QueryClientProvider} from '@tanstack/react-query' +import {queryClient} from 'lib/react-query' const App = observer(function AppImpl() { const [rootStore, setRootStore] = useState<RootStoreModel | undefined>( @@ -30,18 +32,20 @@ const App = observer(function AppImpl() { } return ( - <ThemeProvider theme={rootStore.shell.colorMode}> - <RootSiblingParent> - <analytics.Provider> - <RootStoreProvider value={rootStore}> - <SafeAreaProvider> - <Shell /> - </SafeAreaProvider> - <ToastContainer /> - </RootStoreProvider> - </analytics.Provider> - </RootSiblingParent> - </ThemeProvider> + <QueryClientProvider client={queryClient}> + <ThemeProvider theme={rootStore.shell.colorMode}> + <RootSiblingParent> + <analytics.Provider> + <RootStoreProvider value={rootStore}> + <SafeAreaProvider> + <Shell /> + </SafeAreaProvider> + <ToastContainer /> + </RootStoreProvider> + </analytics.Provider> + </RootSiblingParent> + </ThemeProvider> + </QueryClientProvider> ) }) |