diff --git a/todoblue/src/app/board/[board]/BoardTaskEditor.tsx b/todoblue/src/app/board/[board]/BoardTaskEditor.tsx index ee38fb5..840c426 100644 --- a/todoblue/src/app/board/[board]/BoardTaskEditor.tsx +++ b/todoblue/src/app/board/[board]/BoardTaskEditor.tsx @@ -7,7 +7,7 @@ import {faAdd} from "@fortawesome/free-solid-svg-icons" export function BoardTaskEditor({className}: {className?: string}) { - const {editedTask, send, setEditedTaskText} = useManagedBoard() + const {editedTask, send, setEditedTaskText, websocketState} = useManagedBoard() const submitTask = useCallback((e: FormEvent) => { e.preventDefault(); @@ -15,6 +15,10 @@ export function BoardTaskEditor({className}: {className?: string}) { setEditedTaskText("") }, [send, editedTask]) + if(websocketState != WebSocket.OPEN) { + return null + } + return (