From 3075855592676931126edccad74f11939241809e Mon Sep 17 00:00:00 2001 From: Stefano Pigozzi Date: Thu, 3 Aug 2023 17:17:55 +0200 Subject: [PATCH] Remove unused class --- todoblue/src/app/board/[board]/BoardBody.tsx | 11 ++++++----- todoblue/src/app/board/[board]/BoardError.tsx | 18 ------------------ ...ing.module.css => BoardMainIcon.module.css} | 0 .../src/app/board/[board]/BoardMainIcon.tsx | 17 +++++++++++++++++ .../src/app/board/[board]/BoardMainLoading.tsx | 17 ----------------- .../src/app/board/[board]/TaskDiv.module.css | 4 ---- 6 files changed, 23 insertions(+), 44 deletions(-) delete mode 100644 todoblue/src/app/board/[board]/BoardError.tsx rename todoblue/src/app/board/[board]/{BoardMainLoading.module.css => BoardMainIcon.module.css} (100%) create mode 100644 todoblue/src/app/board/[board]/BoardMainIcon.tsx delete mode 100644 todoblue/src/app/board/[board]/BoardMainLoading.tsx diff --git a/todoblue/src/app/board/[board]/BoardBody.tsx b/todoblue/src/app/board/[board]/BoardBody.tsx index f736aef..9107eb0 100644 --- a/todoblue/src/app/board/[board]/BoardBody.tsx +++ b/todoblue/src/app/board/[board]/BoardBody.tsx @@ -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 + return } text={"Caricamento..."}/> case WebSocket.CONNECTING: - return + return } text={"Connessione..."}/> case WebSocket.OPEN: return case WebSocket.CLOSING: case WebSocket.CLOSED: - return + return } text={"Errore"} className={"red"}/> } } diff --git a/todoblue/src/app/board/[board]/BoardError.tsx b/todoblue/src/app/board/[board]/BoardError.tsx deleted file mode 100644 index 4fee653..0000000 --- a/todoblue/src/app/board/[board]/BoardError.tsx +++ /dev/null @@ -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 ( -
-
- -
-
- {text} -
-
- ) -} diff --git a/todoblue/src/app/board/[board]/BoardMainLoading.module.css b/todoblue/src/app/board/[board]/BoardMainIcon.module.css similarity index 100% rename from todoblue/src/app/board/[board]/BoardMainLoading.module.css rename to todoblue/src/app/board/[board]/BoardMainIcon.module.css diff --git a/todoblue/src/app/board/[board]/BoardMainIcon.tsx b/todoblue/src/app/board/[board]/BoardMainIcon.tsx new file mode 100644 index 0000000..ce6557a --- /dev/null +++ b/todoblue/src/app/board/[board]/BoardMainIcon.tsx @@ -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 ( +
+
+ {icon} +
+
+ {text} +
+
+ ) +} diff --git a/todoblue/src/app/board/[board]/BoardMainLoading.tsx b/todoblue/src/app/board/[board]/BoardMainLoading.tsx deleted file mode 100644 index f7354be..0000000 --- a/todoblue/src/app/board/[board]/BoardMainLoading.tsx +++ /dev/null @@ -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 ( -
-
- -
-
- {text} -
-
- ) -} diff --git a/todoblue/src/app/board/[board]/TaskDiv.module.css b/todoblue/src/app/board/[board]/TaskDiv.module.css index b822d45..0c8c79d 100644 --- a/todoblue/src/app/board/[board]/TaskDiv.module.css +++ b/todoblue/src/app/board/[board]/TaskDiv.module.css @@ -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%;