From 86fd535eafc81e3a39e99f8bef7c11c940508a5f Mon Sep 17 00:00:00 2001 From: Alex Holliday Date: Sat, 14 Feb 2026 00:08:28 +0000 Subject: [PATCH] routes to TS --- client/src/Pages/NotFound/index.tsx | 4 ++-- client/src/Routes/{index.jsx => index.tsx} | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) rename client/src/Routes/{index.jsx => index.tsx} (98%) diff --git a/client/src/Pages/NotFound/index.tsx b/client/src/Pages/NotFound/index.tsx index 709f808be..868a1573a 100644 --- a/client/src/Pages/NotFound/index.tsx +++ b/client/src/Pages/NotFound/index.tsx @@ -9,8 +9,8 @@ import { useTheme } from "@mui/material"; import { useTranslation } from "react-i18next"; interface NotFoundProps { - title: string; - desc: string; + title?: string; + desc?: string; } const NotFoundPage = ({ title, desc }: NotFoundProps) => { diff --git a/client/src/Routes/index.jsx b/client/src/Routes/index.tsx similarity index 98% rename from client/src/Routes/index.jsx rename to client/src/Routes/index.tsx index 3b0b76fc6..e3c0b0667 100644 --- a/client/src/Routes/index.jsx +++ b/client/src/Routes/index.tsx @@ -3,6 +3,7 @@ import { ThemeProvider } from "@mui/material"; import { lightTheme, darkTheme } from "@/Utils/Theme/v2Theme"; import { useSelector } from "react-redux"; +import type { RootState } from "@/store"; import { Navigate, Route, Routes as LibRoutes } from "react-router"; import RootLayout from "@/Components/v2/layout/RootLayout"; import NotFound from "@/Pages/NotFound"; @@ -59,7 +60,7 @@ import { import CreateMonitor from "@/Pages/CreateMonitor"; const Routes = () => { - const mode = useSelector((state) => state.ui.mode); + const mode = useSelector((state: RootState) => state.ui.mode); const v2theme = mode === "light" ? lightTheme : darkTheme; return ( @@ -390,12 +391,11 @@ const Routes = () => { /> - + }