From d4ac9b9cbdff27ae06eb7c6e51e22b96c55d89ee Mon Sep 17 00:00:00 2001 From: Stefano Pigozzi Date: Tue, 22 Aug 2023 05:08:43 +0200 Subject: [PATCH] Use `DEFAULT_BOARD_STATE` in `useBoardState` --- .../app/[lang]/board/[board]/(api)/(state)/useBoardState.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/todoblue/src/app/[lang]/board/[board]/(api)/(state)/useBoardState.ts b/todoblue/src/app/[lang]/board/[board]/(api)/(state)/useBoardState.ts index 18a68db..77ba86c 100644 --- a/todoblue/src/app/[lang]/board/[board]/(api)/(state)/useBoardState.ts +++ b/todoblue/src/app/[lang]/board/[board]/(api)/(state)/useBoardState.ts @@ -3,10 +3,11 @@ import {BoardSignal} from "@/app/[lang]/board/[board]/(api)/(signal)" import {boardReducer} from "@/app/[lang]/board/[board]/(api)/(state)/boardReducer" import {BoardState} from "@/app/[lang]/board/[board]/(api)/(state)/BoardState" +import {DEFAULT_BOARD_STATE} from "@/app/[lang]/board/[board]/(api)/(state)/defaultBoardState" import {Reducer, useReducer} from "react" export function useBoardState() { - const [boardState, processBoardSignal] = useReducer>(boardReducer, {title: "", tasksById: {}}) + const [boardState, processBoardSignal] = useReducer>(boardReducer, DEFAULT_BOARD_STATE) return {boardState, processBoardSignal} }