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>
7 lines
212 B
TypeScript
7 lines
212 B
TypeScript
import { useContext } from 'react';
|
|
import { BoardContext, type BoardContextValue } from '@/app/(main)/boards/BoardProvider';
|
|
|
|
export function useBoard(): BoardContextValue {
|
|
return useContext(BoardContext);
|
|
}
|