mirror of
https://github.com/bitsocialnet/5chan.git
synced 2026-08-03 07:41:04 +02:00
Separate DirectoryModal (for home view placeholders) and CreateBoardModal (for board view create button) into distinct components with their own stores, allowing independent styling and cleaner separation of concerns.
26 lines
469 B
TypeScript
26 lines
469 B
TypeScript
import { create } from 'zustand';
|
|
|
|
interface CreateBoardModalState {
|
|
showModal: boolean;
|
|
openCreateBoardModal: () => void;
|
|
closeCreateBoardModal: () => void;
|
|
}
|
|
|
|
const useCreateBoardModalStore = create<CreateBoardModalState>((set) => ({
|
|
showModal: false,
|
|
|
|
openCreateBoardModal: () => {
|
|
set({
|
|
showModal: true,
|
|
});
|
|
},
|
|
|
|
closeCreateBoardModal: () => {
|
|
set({
|
|
showModal: false,
|
|
});
|
|
},
|
|
}));
|
|
|
|
export default useCreateBoardModalStore;
|