Add board state management with updateBoard and saveBoard methods.

BoardProvider now manages local board state and exposes updateBoard for
editing and saveBoard for persisting to the database. Supports both
create and edit modes with proper redirect after creation.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
Mike CaoandClaude Opus 4.5 committed 2026-01-16 21:05:43 -08:00
1 parent e08907d998
commit 68c56060b3
7 files changed
+176 -48

No files matched your search

+2 -2
View File
@@ -1,6 +1,6 @@
import { useContext } from 'react';
import { BoardContext } from '@/app/(main)/boards/BoardProvider';
import { BoardContext, type BoardContextValue } from '@/app/(main)/boards/BoardProvider';
export function useBoard() {
export function useBoard(): BoardContextValue {
return useContext(BoardContext);
}