nextauth working.
This commit is contained in:
@@ -0,0 +1,16 @@
|
||||
import { create } from 'zustand';
|
||||
import { Session } from 'next-auth';
|
||||
|
||||
interface AuthStore {
|
||||
session: Session | null;
|
||||
isLoading: boolean;
|
||||
setSession: (session: Session | null) => void;
|
||||
setLoading: (isLoading: boolean) => void;
|
||||
}
|
||||
|
||||
export const useAuthStore = create<AuthStore>((set) => ({
|
||||
session: null,
|
||||
isLoading: true,
|
||||
setSession: (session) => set({ session }),
|
||||
setLoading: (isLoading) => set({ isLoading }),
|
||||
}));
|
||||
Reference in New Issue
Block a user