mirror of
https://github.com/linkwarden/linkwarden.git
synced 2026-03-03 00:27:01 +00:00
fix(mobile): refetch on mount
This commit is contained in:
@@ -15,7 +15,7 @@ const queryClient = new QueryClient({
|
||||
defaultOptions: {
|
||||
queries: {
|
||||
staleTime: 1000 * 60 * 60 * 24, // never refetch for 24h
|
||||
refetchOnMount: false,
|
||||
refetchOnMount: true,
|
||||
refetchOnWindowFocus: false,
|
||||
refetchOnReconnect: false,
|
||||
},
|
||||
@@ -37,7 +37,10 @@ export default function RootLayout() {
|
||||
shouldDehydrateQuery: () => true,
|
||||
},
|
||||
}}
|
||||
onSuccess={() => setIsLoading(false)}
|
||||
onSuccess={() => {
|
||||
setIsLoading(false);
|
||||
queryClient.invalidateQueries();
|
||||
}}
|
||||
>
|
||||
<View
|
||||
style={[{ flex: 1 }, colorScheme === "dark" ? darkTheme : lightTheme]}
|
||||
|
||||
Reference in New Issue
Block a user