From 696a36ba920aa0478831c6f850aa893f2a293d8c Mon Sep 17 00:00:00 2001 From: Toba Ojo Date: Mon, 15 Dec 2025 13:17:43 +0000 Subject: [PATCH 1/6] feat: Add support for NPED Category D across components --- public/NPED_Cat_D.svg | 11 ++ src/components/HistoryList/AlertItem.tsx | 3 + src/components/HistoryList/HistoryList.tsx | 4 +- .../PopupSettings/NPEDCategoryPopup.tsx | 7 +- src/components/SessionForm/SessionCard.tsx | 5 + .../SightingModal/SightingModal.tsx | 133 +++++++++++++----- .../SightingsWidget/SightingWidget.tsx | 100 ++++++------- .../providers/IntegrationsContextProvider.tsx | 12 +- src/hooks/useSightingFeed.ts | 8 +- src/utils/utils.ts | 2 + 10 files changed, 193 insertions(+), 92 deletions(-) create mode 100644 public/NPED_Cat_D.svg diff --git a/public/NPED_Cat_D.svg b/public/NPED_Cat_D.svg new file mode 100644 index 0000000..40a235a --- /dev/null +++ b/public/NPED_Cat_D.svg @@ -0,0 +1,11 @@ + + + + \ No newline at end of file diff --git a/src/components/HistoryList/AlertItem.tsx b/src/components/HistoryList/AlertItem.tsx index 97df557..d02613d 100644 --- a/src/components/HistoryList/AlertItem.tsx +++ b/src/components/HistoryList/AlertItem.tsx @@ -8,6 +8,7 @@ import { useCameraBlackboard } from "../../hooks/useCameraBlackboard"; import NPED_CAT_A from "/NPED_Cat_A.svg"; import NPED_CAT_B from "/NPED_Cat_B.svg"; import NPED_CAT_C from "/NPED_Cat_C.svg"; +import NPED_CAT_D from "/NPED_Cat_D.svg"; import { checkIsHotListHit, formatAge, getNPEDCategory } from "../../utils/utils"; import { faX } from "@fortawesome/free-solid-svg-icons"; import { faClock } from "@fortawesome/free-regular-svg-icons"; @@ -30,6 +31,7 @@ const AlertItem = ({ item }: AlertItemProps) => { const isNPEDHitA = cat === "A"; const isNPEDHitB = cat === "B"; const isNPEDHitC = cat === "C"; + const isNPEDHitD = cat === "D"; const handleClick = () => { setIsModalOpen(true); @@ -69,6 +71,7 @@ const AlertItem = ({ item }: AlertItemProps) => { {isNPEDHitA && NPEDHITicon} {isNPEDHitB && NPEDHITicon} {isNPEDHitC && NPEDHITicon} + {isNPEDHitD && NPEDHITicon} diff --git a/src/components/HistoryList/HistoryList.tsx b/src/components/HistoryList/HistoryList.tsx index ae09490..44be467 100644 --- a/src/components/HistoryList/HistoryList.tsx +++ b/src/components/HistoryList/HistoryList.tsx @@ -31,9 +31,7 @@ const HistoryList = () => {
{state?.alertList?.length > 0 ? (
- {state?.alertList?.map((alertItem) => ( - - ))} + {state?.alertList?.map((alertItem) => ).reverse()}
) : (
diff --git a/src/components/PopupSettings/NPEDCategoryPopup.tsx b/src/components/PopupSettings/NPEDCategoryPopup.tsx index 8f5b279..c007714 100644 --- a/src/components/PopupSettings/NPEDCategoryPopup.tsx +++ b/src/components/PopupSettings/NPEDCategoryPopup.tsx @@ -10,6 +10,7 @@ import { toast } from "sonner"; const NPEDCategoryPopup = () => { const { state, dispatch } = useIntegrationsContext(); + const { mutation } = useCameraBlackboard(); const isCatAEnabled = state?.iscatEnabled?.catA; @@ -34,8 +35,8 @@ const NPEDCategoryPopup = () => { await mutation.mutateAsync({ operation: "SAVE", path: "", - value: null - }) + value: null, + }); if (result?.reason === "OK") toast.success("Pop up settings saved"); dispatch({ type: "NPEDCATENABLED", payload: values }); }; @@ -44,7 +45,7 @@ const NPEDCategoryPopup = () => {

Allows alerts to pop up to user.

- +
diff --git a/src/components/SessionForm/SessionCard.tsx b/src/components/SessionForm/SessionCard.tsx index a79a9c7..e0b5d7a 100644 --- a/src/components/SessionForm/SessionCard.tsx +++ b/src/components/SessionForm/SessionCard.tsx @@ -172,6 +172,11 @@ const SessionCard = () => { textColour="text-gray-300" vehicleTag={"Vehicles with NPED Cat C:"} /> +
diff --git a/src/components/SightingModal/SightingModal.tsx b/src/components/SightingModal/SightingModal.tsx index a8091a2..f2cd196 100644 --- a/src/components/SightingModal/SightingModal.tsx +++ b/src/components/SightingModal/SightingModal.tsx @@ -10,7 +10,8 @@ import HotListImg from "/Hotlist_Hit.svg"; import NPED_CAT_A from "/NPED_Cat_A.svg"; import NPED_CAT_B from "/NPED_Cat_B.svg"; import NPED_CAT_C from "/NPED_Cat_C.svg"; -import { checkIsHotListHit, getHotlistName, getNPEDCategory } from "../../utils/utils"; +import NPED_CAT_D from "/NPED_Cat_D.svg"; +import { checkIsHotListHit, getHotlistName, getNPEDCategory, getNPEDReason } from "../../utils/utils"; type SightingModalProps = { isSightingModalOpen: boolean; @@ -74,11 +75,19 @@ const SightingModal = ({ isSightingModalOpen, handleClose, sighting, onDelete }: }; const motionAway = (sighting?.motion ?? "").toUpperCase() === "AWAY"; + const isHotListHit = checkIsHotListHit(sighting); const cat = getNPEDCategory(sighting); const isNPEDHitA = cat === "A"; const isNPEDHitB = cat === "B"; const isNPEDHitC = cat === "C"; + const isNPEDHitD = cat === "D"; + + const reason = getNPEDReason(sighting); + + const insuranceStatus = reason ? reason["INSURANCE STATUS"] : null; + const motStatus = reason ? reason["MOT STATUS"] : null; + const taxStatus = reason ? reason["TAX STATUS"] : null; return ( <> @@ -133,6 +142,7 @@ const SightingModal = ({ isSightingModalOpen, handleClose, sighting, onDelete }: {isNPEDHitA && hotlistHit} {isNPEDHitB && hotlistHit} {isNPEDHitC && hotlistHit} + {isNPEDHitD && hotlistHit}
{hotlistNames && hotlistNames.length > 0 && (
@@ -158,44 +168,97 @@ const SightingModal = ({ isSightingModalOpen, handleClose, sighting, onDelete }:

Vehicle Info

-
VRM
-
{sighting?.vrm ?? "-"}
+
{sighting?.vrm ?? "-"}
+ {isNPEDHitA || isNPEDHitB || isNPEDHitC || isNPEDHitD ? ( + <> +
+
Insurance
+
+ {insuranceStatus ? ( + + YES + + ) : ( + + NO + + )} +
+
+
+
MOT
+
+ {motStatus ? ( + + VALID + + ) : ( + + EXPIRED + + )} +
+
+
+
Tax
+
+ {taxStatus ? ( + + VALID + + ) : ( + + EXPIRED + + )} +
+
+ + ) : ( + <> +
+
Motion
+
{sighting?.motion ?? "-"}
+
+
+
Seen Count
+
{sighting?.seenCount ?? "-"}
+
-
-
Motion
-
{sighting?.motion ?? "-"}
-
-
-
Seen Count
-
{sighting?.seenCount ?? "-"}
-
+ {sighting?.make && sighting.make.trim() && sighting.make.toLowerCase() !== "disabled" && ( +
+
Make
+
{sighting.make}
+
+ )} - {sighting?.make && sighting.make.trim() && sighting.make.toLowerCase() !== "disabled" && ( -
-
Make
-
{sighting.make}
-
+ {sighting?.model && sighting.model.trim() && sighting.model.toLowerCase() !== "disabled" && ( +
+
Model
+
{sighting.model}
+
+ )} + + {sighting?.color && sighting.color.trim() && sighting.color.toLowerCase() !== "disabled" && ( +
+
Colour
+
{sighting.color}
+
+ )} + +
+
Time
+
{sighting?.timeStamp ?? "-"}
+
+ )} - - {sighting?.model && sighting.model.trim() && sighting.model.toLowerCase() !== "disabled" && ( -
-
Model
-
{sighting.model}
-
- )} - - {sighting?.color && sighting.color.trim() && sighting.color.toLowerCase() !== "disabled" && ( -
-
Colour
-
{sighting.color}
-
- )} - -
-
Time
-
{sighting?.timeStamp ?? "-"}
-
diff --git a/src/components/SightingsWidget/SightingWidget.tsx b/src/components/SightingsWidget/SightingWidget.tsx index fe31fe7..4c35e38 100644 --- a/src/components/SightingsWidget/SightingWidget.tsx +++ b/src/components/SightingsWidget/SightingWidget.tsx @@ -12,14 +12,10 @@ import HotListImg from "/Hotlist_Hit.svg"; import NPED_CAT_A from "/NPED_Cat_A.svg"; import NPED_CAT_B from "/NPED_Cat_B.svg"; import NPED_CAT_C from "/NPED_Cat_C.svg"; -import popup from "../../assets/sounds/ui/popup_open.mp3"; -import notification from "../../assets/sounds/ui/notification.mp3"; -import { useSound } from "react-sounds"; +import NPED_CAT_D from "/NPED_Cat_D.svg"; import { useIntegrationsContext } from "../../context/IntegrationsContext"; -import { useSoundContext } from "../../context/SoundContext"; import Loading from "../UI/Loading"; import { checkIsHotListHit, getNPEDCategory } from "../../utils/utils"; -import { useCachedSoundSrc } from "../../hooks/usecachedSoundSrc"; function useNow(tickMs = 1000) { const [, setNow] = useState(() => Date.now()); @@ -41,14 +37,9 @@ type SightingHistoryProps = { export default function SightingHistoryWidget({ className, title }: SightingHistoryProps) { const [modalQueue, setModalQueue] = useState([]); + useNow(1000); - const { state } = useSoundContext(); - const { src: soundSrcHotlist } = useCachedSoundSrc(state?.hotlistSound, state?.soundOptions, notification); - const { src: soundSrcNped } = useCachedSoundSrc(state?.NPEDsound, state?.soundOptions, popup); - - const { play: npedSound } = useSound(soundSrcNped, { volume: state.NPEDsoundVolume }); - const { play: hotlistsound } = useSound(soundSrcHotlist, { volume: state.hotlistSoundVolume }); const { sightings, setSelectedSighting, @@ -73,18 +64,24 @@ export default function SightingHistoryWidget({ className, title }: SightingHist const isCatCEnabled = integrationState?.iscatEnabled?.catC; const isCatDEnabled = integrationState?.iscatEnabled?.catD; - const enqueue = useCallback((sighting: SightingType, kind: HitKind) => { - const id = sighting.vrm ?? sighting.ref; - if (processedRefs.current.has(id)) return; + const enqueue = useCallback( + (sighting: SightingType, kind: HitKind) => { + if (!sighting) return; - const inList = alertState?.alertList?.find((sighting) => sighting.vrm === id); - if (inList) { - return; - } - processedRefs.current.add(id); + const id = sighting.vrm ?? sighting.ref; + if (processedRefs.current.has(id)) return; - setModalQueue((q) => [...q, { id, sighting, kind }]); - }, []); + const inList = alertState?.alertList?.find((sighting) => sighting.vrm === id); + if (inList) { + return; + } + + processedRefs.current.add(id); + + setModalQueue((q) => [...q, { id, sighting, kind }]); + }, + [alertState?.alertList] + ); const reduceObject = (obj: SightingType): ReducedSightingType => { return { @@ -133,31 +130,16 @@ export default function SightingHistoryWidget({ className, title }: SightingHist enqueue(sighting, isNPED ? "NPED" : "HOTLIST"); // enqueue ONLY } } - }, [rows, enqueue]); - - useEffect(() => { - rows?.forEach((obj) => { - const cat = getNPEDCategory(obj); - const isNPEDHitA = cat === "A"; - const isNPEDHitB = cat === "B"; - const isNPEDHitC = cat === "C"; - if (isNPEDHitA || isNPEDHitB || isNPEDHitC) { - dispatch({ - type: "ADD", - payload: obj, - }); - } - }); - }, [dispatch]); + }, [rows, enqueue, isCatAEnabled, isCatBEnabled, isCatCEnabled, isCatDEnabled]); useEffect(() => { if (hasAutoOpenedRef.current || npedRef.current) return; const firstNPED = rows.find((r) => { const cat = getNPEDCategory(r); - const isNPEDHitA = cat === "A"; - const isNPEDHitB = cat === "B"; - const isNPEDHitC = cat === "C"; - const isNPEDHitD = cat === "D"; + const isNPEDHitA = cat === "A" && isCatAEnabled; + const isNPEDHitB = cat === "B" && isCatBEnabled; + const isNPEDHitC = cat === "C" && isCatCEnabled; + const isNPEDHitD = cat === "D" && isCatDEnabled; return isNPEDHitA || isNPEDHitB || isNPEDHitC || isNPEDHitD; }); const firstHot = rows?.find((r) => { @@ -176,20 +158,42 @@ export default function SightingHistoryWidget({ className, title }: SightingHist hasAutoOpenedRef.current = true; } - }, [enqueue, hotlistsound, npedSound, rows, setSelectedSighting, setSightingModalOpen]); + }, [ + enqueue, + rows, + setSelectedSighting, + setSightingModalOpen, + isCatAEnabled, + isCatBEnabled, + isCatCEnabled, + isCatDEnabled, + ]); useEffect(() => { if (!isSightingModalOpen && modalQueue.length > 0) { const next = modalQueue[0]; - - if (next.kind === "NPED") npedSound(); - else hotlistsound(); - setSelectedSighting(next.sighting); setSightingModalOpen(true); } - }, [isSightingModalOpen, npedSound, hotlistsound, setSelectedSighting, setSightingModalOpen, modalQueue]); + }, [isSightingModalOpen, setSelectedSighting, setSightingModalOpen, modalQueue]); + + useEffect(() => { + rows?.forEach((obj) => { + const cat = getNPEDCategory(obj); + const isNPEDHitA = cat === "A"; + const isNPEDHitB = cat === "B"; + const isNPEDHitC = cat === "C"; + const isNPEDHitD = cat === "D"; + if (isNPEDHitA || isNPEDHitB || isNPEDHitC || isNPEDHitD) { + console.log("first"); + dispatch({ + type: "ADD", + payload: obj, + }); + } + }); + }, [dispatch, rows]); const handleClose = () => { setSightingModalOpen(false); @@ -212,6 +216,7 @@ export default function SightingHistoryWidget({ className, title }: SightingHist const isNPEDHitA = cat === "A"; const isNPEDHitB = cat === "B"; const isNPEDHitC = cat === "C"; + const isNPEDHitD = cat === "D"; const motionAway = (obj?.motion ?? "").toUpperCase() === "AWAY"; const isHotListHit = checkIsHotListHit(obj); return ( @@ -230,6 +235,7 @@ export default function SightingHistoryWidget({ className, title }: SightingHist {isNPEDHitA && hotlistHit} {isNPEDHitB && hotlistHit} {isNPEDHitC && hotlistHit} + {isNPEDHitD && hotlistHit} diff --git a/src/context/providers/IntegrationsContextProvider.tsx b/src/context/providers/IntegrationsContextProvider.tsx index 4a5bba3..49e9301 100644 --- a/src/context/providers/IntegrationsContextProvider.tsx +++ b/src/context/providers/IntegrationsContextProvider.tsx @@ -36,10 +36,16 @@ export const IntegrationsProvider = ({ children }: IntegrationsProviderType) => }); if (!isMounted) return; - if (!result?.result || typeof result.result === "string") return; - dispatch({ type: "UPDATE", payload: result.result }); - dispatch({ type: "NPEDCATENABLED", payload: catResult.result }); + if (result?.result && typeof result.result !== "string") { + dispatch({ type: "UPDATE", payload: result.result }); + } + + if (catResult?.result) { + dispatch({ type: "NPEDCATENABLED", payload: catResult.result }); + } else { + console.log("Early return: catResult check failed"); + } } catch (error) { console.error("Error in fetchData:", error); } diff --git a/src/hooks/useSightingFeed.ts b/src/hooks/useSightingFeed.ts index 38eca48..e71e3c3 100644 --- a/src/hooks/useSightingFeed.ts +++ b/src/hooks/useSightingFeed.ts @@ -88,8 +88,14 @@ export function useSightingFeed(url: string | undefined) { const isNPEDHitA = cat === "A"; const isNPEDHitB = cat === "B"; const isNPEDHitC = cat === "C"; + const isNPEDHitD = cat === "D"; - if ((isNPEDHitA && audioArmed) || (isNPEDHitB && audioArmed) || (isNPEDHitC && audioArmed)) { + if ( + (isNPEDHitA && audioArmed) || + (isNPEDHitB && audioArmed) || + (isNPEDHitC && audioArmed) || + (isNPEDHitD && audioArmed) + ) { playNPEDHitSound(); } else if (isHotListHit && audioArmed) { playHotlistsound(); diff --git a/src/utils/utils.ts b/src/utils/utils.ts index 7cdc0a8..57cd8fb 100644 --- a/src/utils/utils.ts +++ b/src/utils/utils.ts @@ -159,6 +159,8 @@ export function getHotlistName(obj: HotlistMatches | undefined) { export const getNPEDCategory = (r?: SightingType | null) => r?.metadata?.npedJSON?.["NPED CATEGORY"] as "A" | "B" | "C" | "D" | undefined; +export const getNPEDReason = (r?: SightingType | null) => r?.metadata?.npedJSON; + export const zoomMapping = (zoomLevel: number | undefined) => { switch (zoomLevel) { case 1: -- 2.25.1 From 8b635101de2d748f7bdf2461bbb3cd87d05eb553 Mon Sep 17 00:00:00 2001 From: Toba Ojo Date: Mon, 15 Dec 2025 13:18:14 +0000 Subject: [PATCH 2/6] fix: update version to 1.0.17 in package.json --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 585bf38..7d74f6b 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "in-car-system-fe", "private": true, - "version": "1.0.16", + "version": "1.0.17", "type": "module", "scripts": { "dev": "vite", -- 2.25.1 From cae652477e89960c29eb9135114ae0b6c23caae3 Mon Sep 17 00:00:00 2001 From: Toba Ojo Date: Mon, 15 Dec 2025 14:46:48 +0000 Subject: [PATCH 3/6] - enhanced modal animations --- package.json | 2 +- .../SightingModal/SightingModal.tsx | 7 +++-- src/components/UI/ModalComponent.tsx | 12 ++++++-- src/components/UI/VersionsModal.tsx | 4 +-- .../providers/IntegrationsContextProvider.tsx | 5 +++- src/index.css | 30 +++++++++++++++++++ 6 files changed, 51 insertions(+), 9 deletions(-) diff --git a/package.json b/package.json index 7d74f6b..747c951 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "in-car-system-fe", "private": true, - "version": "1.0.17", + "version": "1.0.18", "type": "module", "scripts": { "dev": "vite", diff --git a/src/components/SightingModal/SightingModal.tsx b/src/components/SightingModal/SightingModal.tsx index f2cd196..eda9cc6 100644 --- a/src/components/SightingModal/SightingModal.tsx +++ b/src/components/SightingModal/SightingModal.tsx @@ -21,6 +21,7 @@ type SightingModalProps = { }; const SightingModal = ({ isSightingModalOpen, handleClose, sighting, onDelete }: SightingModalProps) => { + console.log(sighting); const { dispatch } = useAlertHitContext(); const { query, mutation } = useCameraBlackboard(); @@ -147,13 +148,13 @@ const SightingModal = ({ isSightingModalOpen, handleClose, sighting, onDelete }: {hotlistNames && hotlistNames.length > 0 && (

Hotlists

-
+
{hotlistNames.map((hotlistName, index) => ( -
+

{hotlistName ? hotlistName?.replace(/\.csv$/i, "") : "-"}

-
+ ))}
diff --git a/src/components/UI/ModalComponent.tsx b/src/components/UI/ModalComponent.tsx index 93c9c79..9a56e83 100644 --- a/src/components/UI/ModalComponent.tsx +++ b/src/components/UI/ModalComponent.tsx @@ -12,8 +12,16 @@ const ModalComponent = ({ isModalOpen, children, close }: ModalComponentProps) = {children} diff --git a/src/components/UI/VersionsModal.tsx b/src/components/UI/VersionsModal.tsx index 47c9e8f..e6932d6 100644 --- a/src/components/UI/VersionsModal.tsx +++ b/src/components/UI/VersionsModal.tsx @@ -15,10 +15,10 @@ const VersionsModal = ({ isDevModalOpen, handleClose, data }: VersionsModalProps return ( -
+
diff --git a/src/context/providers/IntegrationsContextProvider.tsx b/src/context/providers/IntegrationsContextProvider.tsx index 49e9301..d3f2ec0 100644 --- a/src/context/providers/IntegrationsContextProvider.tsx +++ b/src/context/providers/IntegrationsContextProvider.tsx @@ -44,7 +44,10 @@ export const IntegrationsProvider = ({ children }: IntegrationsProviderType) => if (catResult?.result) { dispatch({ type: "NPEDCATENABLED", payload: catResult.result }); } else { - console.log("Early return: catResult check failed"); + dispatch({ + type: "NPEDCATENABLED", + payload: { catA: true, catB: true, catC: true, catD: true }, + }); } } catch (error) { console.error("Error in fetchData:", error); diff --git a/src/index.css b/src/index.css index 77fced0..7bb5b46 100644 --- a/src/index.css +++ b/src/index.css @@ -37,3 +37,33 @@ body { stroke-width: 20px; stroke-linejoin: round; } + +/* Modal animations */ +.ReactModal__Overlay { + opacity: 0; + transition: opacity 200ms ease-in-out; +} + +.ReactModal__Overlay--after-open { + opacity: 1; +} + +.ReactModal__Overlay--before-close { + opacity: 0; +} + +.ReactModal__Content { + transform: scale(0.9) translateY(-20px); + opacity: 0; + transition: all 200ms ease-in-out; +} + +.ReactModal__Content--after-open { + transform: scale(1) translateY(0); + opacity: 1; +} + +.ReactModal__Content--before-close { + transform: scale(0.9) translateY(-20px); + opacity: 0; +} -- 2.25.1 From 555330991dce353a0f72c43617036a3d1c0b6a40 Mon Sep 17 00:00:00 2001 From: Toba Ojo Date: Mon, 15 Dec 2025 16:07:30 +0000 Subject: [PATCH 4/6] - added websocket context to connect to websockets if needed --- package.json | 3 +- src/App.tsx | 31 +- .../WiFi&Modem/WiFiSettingsForm.tsx | 18 +- .../SightingModal/SightingModal.tsx | 1 - src/components/UI/Header.tsx | 3 + src/context/WebsocketContext.ts | 24 + src/context/providers/WebSocketProvider.tsx | 40 ++ src/types/types.ts | 9 +- src/utils/ws_config.ts | 5 + yarn.lock | 438 ++++++++++++++++-- 10 files changed, 510 insertions(+), 62 deletions(-) create mode 100644 src/context/WebsocketContext.ts create mode 100644 src/context/providers/WebSocketProvider.tsx create mode 100644 src/utils/ws_config.ts diff --git a/package.json b/package.json index 747c951..3332ce4 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "in-car-system-fe", "private": true, - "version": "1.0.18", + "version": "1.0.19", "type": "module", "scripts": { "dev": "vite", @@ -31,6 +31,7 @@ "react-swipeable": "^7.0.2", "react-tabs": "^6.1.0", "react-use": "^17.6.0", + "react-use-websocket": "^4.13.0", "sonner": "^2.0.7", "tailwindcss": "^4.1.11", "use-debounce": "^10.0.6" diff --git a/src/App.tsx b/src/App.tsx index 5aaa5a7..d7d0262 100644 --- a/src/App.tsx +++ b/src/App.tsx @@ -9,25 +9,28 @@ import { IntegrationsProvider } from "./context/providers/IntegrationsContextPro import { AlertHitProvider } from "./context/providers/AlertHitProvider"; import { SoundProvider } from "react-sounds"; import SoundContextProvider from "./context/providers/SoundContextProvider"; +import WebSocketProvider from "./context/providers/WebSocketProvider"; function App() { return ( - - - - }> - } /> - } /> - } /> - } /> - } /> - } /> - - - - + + + + + }> + } /> + } /> + } /> + } /> + } /> + } /> + + + + + ); diff --git a/src/components/SettingForms/WiFi&Modem/WiFiSettingsForm.tsx b/src/components/SettingForms/WiFi&Modem/WiFiSettingsForm.tsx index 457482f..cd3b861 100644 --- a/src/components/SettingForms/WiFi&Modem/WiFiSettingsForm.tsx +++ b/src/components/SettingForms/WiFi&Modem/WiFiSettingsForm.tsx @@ -17,7 +17,6 @@ const WiFiSettingsForm = () => { const initialValues = { ssid: wifiSSID ?? "", password: wifiPassword ?? "", - encryption: "WPA2", }; const validatePassword = (password: string) => { @@ -83,22 +82,7 @@ const WiFiSettingsForm = () => { />
- - - - - - - - - +