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

Remove unused class

This commit is contained in:
Steffo 2023-08-03 17:17:55 +02:00
parent 92c720f61d
commit 3075855592
Signed by: steffo
GPG key ID: 2A24051445686895
6 changed files with 23 additions and 44 deletions

View file

@ -1,7 +1,8 @@
import {BoardMainTaskGroups} from "@/app/board/[board]/BoardMainTaskGroups"
import {BoardError} from "@/app/board/[board]/BoardError"
import {BoardMainLoading} from "@/app/board/[board]/BoardMainLoading"
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() {
@ -9,13 +10,13 @@ export function BoardBody() {
switch(websocketState) {
case undefined:
return <BoardMainLoading text={"Caricamento..."}/>
return <BoardMainIcon icon={<FontAwesomeIcon icon={faGear} spin/>} text={"Caricamento..."}/>
case WebSocket.CONNECTING:
return <BoardMainLoading text={"Connessione..."}/>
return <BoardMainIcon icon={<FontAwesomeIcon icon={faArrowsSpin} spin/>} text={"Connessione..."}/>
case WebSocket.OPEN:
return <BoardMainTaskGroups/>
case WebSocket.CLOSING:
case WebSocket.CLOSED:
return <BoardError text={"Errore"}/>
return <BoardMainIcon icon={<FontAwesomeIcon icon={faExclamationCircle}/>} text={"Errore"} className={"red"}/>
}
}

View file

@ -1,18 +0,0 @@
import style from "./BoardError.module.css"
import {faExclamationCircle} from "@fortawesome/free-solid-svg-icons"
import {FontAwesomeIcon} from "@fortawesome/react-fontawesome"
import classNames from "classnames"
export function BoardError({text}: {text: string}) {
return (
<main className={classNames("red", style.boardError)}>
<div>
<FontAwesomeIcon size={"4x"} icon={faExclamationCircle}/>
</div>
<div>
{text}
</div>
</main>
)
}

View file

@ -0,0 +1,17 @@
import cn from "classnames"
import {ReactNode} from "react"
import style from "./BoardMainIcon.module.css"
export function BoardMainIcon({text, icon, className}: {text: string, icon: ReactNode, className?: string}) {
return (
<main className={cn(style.boardLoading, className)}>
<div>
{icon}
</div>
<div>
{text}
</div>
</main>
)
}

View file

@ -1,17 +0,0 @@
import style from "./BoardLoading.module.css"
import {faSpinner} from "@fortawesome/free-solid-svg-icons"
import {FontAwesomeIcon} from "@fortawesome/react-fontawesome"
export function BoardMainLoading({text}: {text: string}) {
return (
<main className={style.boardLoading}>
<div>
<FontAwesomeIcon size={"4x"} icon={faSpinner} pulse/>
</div>
<div>
{text}
</div>
</main>
)
}

View file

@ -49,10 +49,6 @@
padding: 8px;
}
.asdaf {
--something: hsl(150, 1%, 41%), hsl(213, 22%, 61%), hsl(212, 100%, 81%), hsl(6, 66%, 72%), hsl(17, 98%, 52%);
}
.taskImportanceHighest {
--bhsl-current-hue: 15deg;
--bhsl-current-saturation: 98%;