mirror of
https://github.com/Steffo99/todocolors.git
synced 2024-11-22 08:14: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";
|
"use client";
|
||||||
|
|
||||||
import {BoardBody} from "@/app/board/[board]/BoardBody"
|
import {BoardMain} from "@/app/board/[board]/BoardMain"
|
||||||
import {BoardManager} from "@/app/board/[board]/BoardManager"
|
import {BoardManager} from "@/app/board/[board]/BoardManager"
|
||||||
import {BoardHeader} from "@/app/board/[board]/BoardHeader"
|
import {BoardHeader} from "@/app/board/[board]/BoardHeader"
|
||||||
|
|
||||||
|
@ -9,7 +9,7 @@ export default function Page({params: {board}}: {params: {board: string}}) {
|
||||||
return (
|
return (
|
||||||
<BoardManager name={board}>
|
<BoardManager name={board}>
|
||||||
<BoardHeader/>
|
<BoardHeader/>
|
||||||
<BoardBody/>
|
<BoardMain/>
|
||||||
</BoardManager>
|
</BoardManager>
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue