Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion docs/content/docs/framework-guides/sveltekit.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -373,7 +373,7 @@ Note: To add SSR support (`data.currentUser`) also add the `src/routes/+page.ser
const isLoading = $derived(auth.isLoading && !data.currentUser);
const isAuthenticated = $derived(auth.isAuthenticated || !!data.currentUser);

const currentUserResponse = useQuery(api.auth.getCurrentUser, {});
const currentUserResponse = useQuery(api.auth.getCurrentUser, () => (isAuthenticated ? {} : 'skip'));
let user = $derived(currentUserResponse.data ?? data.currentUser);

// Sign in/up form state
Expand Down