upd
This commit is contained in:
@@ -0,0 +1,16 @@
|
||||
import { ReactNode } from "react";
|
||||
import { create } from "zustand";
|
||||
|
||||
interface ModalState {
|
||||
modal: ReactNode | null;
|
||||
setModal: (modal: ReactNode) => void;
|
||||
removeModal: () => void;
|
||||
}
|
||||
|
||||
const useModalStore = create<ModalState>((set) => ({
|
||||
modal: null,
|
||||
setModal: (modal) => set({ modal }),
|
||||
removeModal: set({ modal: null }),
|
||||
}));
|
||||
|
||||
export default useModalStore;
|
||||
Reference in New Issue
Block a user