mirror of
https://github.com/Jellify-Music/App.git
synced 2026-02-08 19:48:40 -06:00
Wrap app in query client lol
did you RTFM?
This commit is contained in:
23
App.tsx
23
App.tsx
@@ -15,10 +15,13 @@ import { usePlayer } from './player/queries';
|
||||
import Login from './components/Login/component';
|
||||
import Jellify from './components/Jellify/component';
|
||||
import { useApi } from './api/queries';
|
||||
import { QueryClient, QueryClientProvider } from '@tanstack/react-query';
|
||||
|
||||
export default function App(): React.JSX.Element {
|
||||
const isDarkMode = useColorScheme() === 'dark';
|
||||
|
||||
const queryClient = new QueryClient();
|
||||
|
||||
usePlayer;
|
||||
|
||||
// Attempt to create API instance, if it fails we aren't authenticated yet
|
||||
@@ -29,14 +32,16 @@ export default function App(): React.JSX.Element {
|
||||
};
|
||||
|
||||
return (
|
||||
<NavigationContainer>
|
||||
<SafeAreaView style={backgroundStyle}>
|
||||
<StatusBar
|
||||
barStyle={isDarkMode ? 'light-content' : 'dark-content'}
|
||||
backgroundColor={backgroundStyle.backgroundColor}
|
||||
/>
|
||||
isSuccess ? <Jellify /> : <Login />
|
||||
</SafeAreaView>
|
||||
</NavigationContainer>
|
||||
<QueryClientProvider client={queryClient}>
|
||||
<NavigationContainer>
|
||||
<SafeAreaView style={backgroundStyle}>
|
||||
<StatusBar
|
||||
barStyle={isDarkMode ? 'light-content' : 'dark-content'}
|
||||
backgroundColor={backgroundStyle.backgroundColor}
|
||||
/>
|
||||
isSuccess ? <Jellify /> : <Login />
|
||||
</SafeAreaView>
|
||||
</NavigationContainer>
|
||||
</QueryClientProvider>
|
||||
);
|
||||
}
|
||||
Reference in New Issue
Block a user