diff --git a/todoblue/src/app/[lang]/board/[board]/BoardMain.tsx b/todoblue/src/app/[lang]/board/[board]/BoardMain.tsx index 0f93381..e638b60 100644 --- a/todoblue/src/app/[lang]/board/[board]/BoardMain.tsx +++ b/todoblue/src/app/[lang]/board/[board]/BoardMain.tsx @@ -1,12 +1,12 @@ import {BoardMainIcon} from "@/app/[lang]/board/[board]/BoardMainIcon" import {BoardMainTaskGroups} from "@/app/[lang]/board/[board]/BoardMainTaskGroups" import {useManagedBoard} from "@/app/[lang]/board/[board]/BoardManager" -import {faLink, faLinkSlash, faGear} from "@fortawesome/free-solid-svg-icons" +import {faLink, faLinkSlash, faGear, faAsterisk} from "@fortawesome/free-solid-svg-icons" import {FontAwesomeIcon} from "@fortawesome/react-fontawesome" export function BoardMain({className}: {className?: string}) { - const {webSocketState, webSocketBackoffMs} = useManagedBoard() + const {webSocketState, webSocketBackoffMs, taskGroups} = useManagedBoard() switch(webSocketState) { case undefined: @@ -14,7 +14,12 @@ export function BoardMain({className}: {className?: string}) { case WebSocket.CONNECTING: return } text={"Connessione..."} className={className}/> case WebSocket.OPEN: - return + if(taskGroups.length === 0) { + return } text={"Nulla da visualizzare"} className={className}/> + } + else { + return + } case WebSocket.CLOSING: return } text={"Disconnessione..."} className={className}/> case WebSocket.CLOSED: diff --git a/todoblue/src/app/[lang]/board/[board]/BoardMainTaskGroups.tsx b/todoblue/src/app/[lang]/board/[board]/BoardMainTaskGroups.tsx index 056c2aa..e11991c 100644 --- a/todoblue/src/app/[lang]/board/[board]/BoardMainTaskGroups.tsx +++ b/todoblue/src/app/[lang]/board/[board]/BoardMainTaskGroups.tsx @@ -1,3 +1,4 @@ +import {BoardMainIcon} from "@/app/[lang]/board/[board]/BoardMainIcon" import {useManagedBoard} from "@/app/[lang]/board/[board]/BoardManager" import {TaskDisplay} from "@/app/[lang]/board/[board]/TaskDisplay" import {TaskGroup} from "@/app/[lang]/board/[board]/useBoardTaskArranger"