diff --git a/src/App.tsx b/src/App.tsx index af528a1..b22383a 100644 --- a/src/App.tsx +++ b/src/App.tsx @@ -1,6 +1,6 @@ -import { useState } from "react"; +import { useState, MouseEventHandler } from "react"; -import { Routes, Route, Navigate } from "react-router-dom"; +import { Routes, Route } from "react-router-dom"; import { Helmet } from "react-helmet"; import AppBar from "./components/AppBar"; @@ -18,7 +18,7 @@ import "./App.css"; type AppProps = { darkMode: boolean; - toggleDarkMode: Function; + toggleDarkMode: MouseEventHandler; }; function App(props: AppProps) { diff --git a/src/lib/paddles.ts b/src/lib/paddles.ts index d8c1b57..4f5d1e2 100644 --- a/src/lib/paddles.ts +++ b/src/lib/paddles.ts @@ -153,7 +153,7 @@ function useStatsNodeLocks(params: GetURLParams): UseQueryResult { let users = new Map(); - data.map((node) => { + data.forEach((node) => { let owner: string = node["locked"] ? (node["locked_by"] || "-") : "(free)"; let mtype: string = node["machine_type"] || "None"; let mtype_dict = users.get(owner) || new Map(); diff --git a/src/lib/teuthologyAPI.ts b/src/lib/teuthologyAPI.ts index 19b09ba..41f6651 100644 --- a/src/lib/teuthologyAPI.ts +++ b/src/lib/teuthologyAPI.ts @@ -47,7 +47,7 @@ function useUserData(): Map { const cookie_ = cookie.replace(/\\073/g, ';'); let cookieMap: Map = new Map(); let cookieSegments = cookie_.split(";"); - cookieSegments.map((cookie: string) => { + cookieSegments.forEach((cookie: string) => { let [key, value] = cookie.split("="); cookieMap.set(key.trim(), value.trim()); })