feat: boards dnd editor for mobile

This commit is contained in:
2025-08-09 10:13:25 +04:00
parent 5ecdd3d887
commit e3137de46d
11 changed files with 166 additions and 17 deletions

View File

@ -21,6 +21,8 @@ type BoardsContextState = {
onCreateBoard: (name: string) => void;
onUpdateBoard: (boardId: number, board: UpdateBoardSchema) => void;
onDeleteBoard: (board: BoardSchema) => void;
isEditorDrawerOpened: boolean;
setIsEditorDrawerOpened: React.Dispatch<React.SetStateAction<boolean>>;
};
const BoardsContext = createContext<BoardsContextState | undefined>(undefined);
@ -35,6 +37,8 @@ const useBoardsContextState = () => {
const [selectedBoard, setSelectedBoard] = useState<BoardSchema | null>(
null
);
const [isEditorDrawerOpened, setIsEditorDrawerOpened] =
useState<boolean>(false);
useEffect(() => {
if (boards.length > 0 && selectedBoard === null) {
@ -70,6 +74,8 @@ const useBoardsContextState = () => {
onCreateBoard,
onUpdateBoard,
onDeleteBoard,
isEditorDrawerOpened,
setIsEditorDrawerOpened,
};
};