react-code-dataset
/
Full-Stack-Spotify-Clone-Next-13.4-React-Stripe-Supabase-Tailwind
/hooks
/useAuthModal.ts
| import { create } from 'zustand'; | |
| interface AuthModalStore { | |
| isOpen: boolean; | |
| onOpen: () => void; | |
| onClose: () => void; | |
| } | |
| const useAuthModal = create<AuthModalStore>((set) => ({ | |
| isOpen: false, | |
| onOpen: () => set({ isOpen: true }), | |
| onClose: () => set({ isOpen: false }), | |
| })); | |
| export default useAuthModal; | |