mirror of
https://github.com/Steffo99/todocolors.git
synced 2024-11-25 17:54:18 +00:00
Rename BoardBody
to BoardMain
This commit is contained in:
parent
3075855592
commit
acb31c46eb
2 changed files with 2 additions and 24 deletions
|
@ -1,22 +0,0 @@
|
|||
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 BoardBody() {
|
||||
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"}/>
|
||||
}
|
||||
}
|
|
@ -1,6 +1,6 @@
|
|||
"use client";
|
||||
|
||||
import {BoardBody} from "@/app/board/[board]/BoardBody"
|
||||
import {BoardMain} from "@/app/board/[board]/BoardMain"
|
||||
import {BoardManager} from "@/app/board/[board]/BoardManager"
|
||||
import {BoardHeader} from "@/app/board/[board]/BoardHeader"
|
||||
|
||||
|
@ -9,7 +9,7 @@ export default function Page({params: {board}}: {params: {board: string}}) {
|
|||
return (
|
||||
<BoardManager name={board}>
|
||||
<BoardHeader/>
|
||||
<BoardBody/>
|
||||
<BoardMain/>
|
||||
</BoardManager>
|
||||
)
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue