diff --git a/web-new/src/api/index.tsx b/web-new/src/api/index.tsx index b2aa97a08..1f59ed71c 100644 --- a/web-new/src/api/index.tsx +++ b/web-new/src/api/index.tsx @@ -3,6 +3,7 @@ import useSWR, { SWRConfig } from "swr"; import { WsProvider } from "./ws"; import axios from "axios"; import { ReactNode } from "react"; +import { FrigateConfig } from "@/types/frigateConfig"; axios.defaults.baseURL = `${baseUrl}api/`; @@ -36,8 +37,6 @@ type WsWithConfigType = { children: ReactNode; }; -type FrigateConfig = Record; - function WsWithConfig({ children }: WsWithConfigType) { const { data } = useSWR("config"); diff --git a/web-new/src/api/ws.tsx b/web-new/src/api/ws.tsx index d9eb063f4..3f1cd87e6 100644 --- a/web-new/src/api/ws.tsx +++ b/web-new/src/api/ws.tsx @@ -9,8 +9,7 @@ import { } from "react"; import { produce, Draft } from "immer"; import useWebSocket, { ReadyState } from "react-use-websocket"; - -type FrigateConfig = Record; +import { FrigateConfig } from "@/types/frigateConfig"; type ReducerState = { [topic: string]: {