1
Fork 0
mirror of https://github.com/Steffo99/todocolors.git synced 2024-11-25 17:54:18 +00:00

Use <main> instead of <div> in BoardMainTaskGroups

This commit is contained in:
Steffo 2023-08-03 17:23:44 +02:00
parent acb31c46eb
commit 3f774cfa6d
Signed by: steffo
GPG key ID: 2A24051445686895
2 changed files with 24 additions and 2 deletions

View file

@ -0,0 +1,22 @@
import {BoardMainTaskGroups} from "@/app/board/[board]/BoardMainTaskGroups"
import {BoardMainIcon} from "@/app/board/[board]/BoardMainIcon"
import {useBoardContext} from "@/app/board/[board]/useBoardContext"
import {FontAwesomeIcon} from "@fortawesome/react-fontawesome"
import {faGear, faArrowsSpin, faExclamationCircle} from "@fortawesome/free-solid-svg-icons"
export function BoardMain() {
const {websocketState} = useBoardContext()
switch(websocketState) {
case undefined:
return <BoardMainIcon icon={<FontAwesomeIcon icon={faGear} spin/>} text={"Caricamento..."}/>
case WebSocket.CONNECTING:
return <BoardMainIcon icon={<FontAwesomeIcon icon={faArrowsSpin} spin/>} text={"Connessione..."}/>
case WebSocket.OPEN:
return <BoardMainTaskGroups/>
case WebSocket.CLOSING:
case WebSocket.CLOSED:
return <BoardMainIcon icon={<FontAwesomeIcon icon={faExclamationCircle}/>} text={"Errore"} className={"red"}/>
}
}

View file

@ -6,8 +6,8 @@ export function BoardMainTaskGroups() {
const {taskGroups} = useBoardContext()
return (
<div className={"chapter-5"}>
<main className={"chapter-5"}>
{taskGroups.map((tg) => <TaskGroupColumn taskGroup={tg}/>)}
</div>
</main>
)
}