mirror of
https://github.com/Dvorinka/Containr.git
synced 2026-10-28 15:51:26 +00:00
small fix, don't worry about it
This commit is contained in:
1 parent
08bd0c6e5c
commit
08cb5754f3
638 files changed
+57330
-34704
No files matched your search
@@ -0,0 +1,19 @@
|
||||
import { useQuery } from '@tanstack/react-query';
|
||||
import { getAuthSession } from '@/lib/auth-client';
|
||||
|
||||
type UseAuthSessionOptions = {
|
||||
enabled?: boolean;
|
||||
};
|
||||
|
||||
export function useAuthSession(options: UseAuthSessionOptions = {}) {
|
||||
const { enabled = true } = options;
|
||||
|
||||
return useQuery({
|
||||
queryKey: ['auth-session'],
|
||||
queryFn: getAuthSession,
|
||||
enabled,
|
||||
staleTime: 30_000,
|
||||
refetchOnWindowFocus: true,
|
||||
retry: false,
|
||||
});
|
||||
}
|
||||
Reference in new issue
Block a user