Fix react-query devtools error on mobile

This commit is contained in:
Zoe Roux 2025-02-26 00:17:52 +01:00
parent 3405ea9caf
commit 5c13f38dab
No known key found for this signature in database
2 changed files with 3 additions and 3 deletions

View File

@ -1,5 +1,6 @@
import { ReactQueryDevtools } from "@tanstack/react-query-devtools";
import { Slot, useServerHeadInsertion } from "one";
import { Slot, useServerHeadInsertion } from "one";
import { Platform } from "react-native";
import { StyleRegistryProvider, createStyleRegistry } from "yoshiki/web";
import { Providers } from "~/providers";
@ -80,7 +81,7 @@ export default function Layout() {
<StyleRegistryProvider registry={registry}>
<Providers>
<Slot />
<ReactQueryDevtools initialIsOpen={false} />
{Platform.OS === "web" && <ReactQueryDevtools initialIsOpen={false} />}
</Providers>
</StyleRegistryProvider>
</body>

View File

@ -43,7 +43,6 @@ export const AccountProvider = ({ children }: { children: ReactNode }) => {
authToken: ret.authToken?.access_token,
},
});
console.log(user);
// Use a ref here because we don't want the effect to trigger when the selected
// value has changed, only when the fetch result changed
// If we trigger the effect when the selected value change, we enter an infinite render loop