From da245fbf6e649844bb159203b450c4c73ca06576 Mon Sep 17 00:00:00 2001 From: Nick Mowen Date: Fri, 15 Dec 2023 14:13:19 -0700 Subject: [PATCH] Cleanup hooks --- web-new/src/components/camera/CameraImage.tsx | 2 +- web-new/src/hooks/{index.ts => resize-observer.ts} | 0 .../use-persistence.tsx => hooks/use-persistence.ts} | 0 web-new/src/pages/Live.tsx | 2 +- web-new/vite.config.ts | 12 ++++++------ 5 files changed, 8 insertions(+), 8 deletions(-) rename web-new/src/hooks/{index.ts => resize-observer.ts} (100%) rename web-new/src/{context/use-persistence.tsx => hooks/use-persistence.ts} (100%) diff --git a/web-new/src/components/camera/CameraImage.tsx b/web-new/src/components/camera/CameraImage.tsx index 485bc6c15..61a405352 100644 --- a/web-new/src/components/camera/CameraImage.tsx +++ b/web-new/src/components/camera/CameraImage.tsx @@ -2,7 +2,7 @@ import { useApiHost } from "@/api"; import { useCallback, useEffect, useMemo, useRef, useState } from "react"; import useSWR from "swr"; import ActivityIndicator from "../ui/activity-indicator"; -import { useResizeObserver } from "@/hooks"; +import { useResizeObserver } from "@/hooks/resize-observer"; type CameraImageProps = { camera: string; diff --git a/web-new/src/hooks/index.ts b/web-new/src/hooks/resize-observer.ts similarity index 100% rename from web-new/src/hooks/index.ts rename to web-new/src/hooks/resize-observer.ts diff --git a/web-new/src/context/use-persistence.tsx b/web-new/src/hooks/use-persistence.ts similarity index 100% rename from web-new/src/context/use-persistence.tsx rename to web-new/src/hooks/use-persistence.ts diff --git a/web-new/src/pages/Live.tsx b/web-new/src/pages/Live.tsx index 52ccb7f0f..66061a0db 100644 --- a/web-new/src/pages/Live.tsx +++ b/web-new/src/pages/Live.tsx @@ -10,7 +10,7 @@ import { DropdownMenuTrigger, } from "@/components/ui/dropdown-menu"; import Heading from "@/components/ui/heading"; -import { usePersistence } from "@/context/use-persistence"; +import { usePersistence } from "@/hooks/use-persistence"; import { FrigateConfig } from "@/types/frigateConfig"; import { useMemo, useState } from "react"; import useSWR from "swr"; diff --git a/web-new/vite.config.ts b/web-new/vite.config.ts index 5d5bf8207..a97dbd014 100644 --- a/web-new/vite.config.ts +++ b/web-new/vite.config.ts @@ -12,24 +12,24 @@ export default defineConfig({ server: { proxy: { '/api': { - target: 'http://192.168.50.106:5000', + target: 'http://localhost:5000', ws: true, }, '/vod': { - target: 'http://192.168.50.106:5000' + target: 'http://localhost:5000' }, '/clips': { - target: 'http://192.168.50.106:5000' + target: 'http://localhost:5000' }, '/exports': { - target: 'http://192.168.50.106:5000' + target: 'http://localhost:5000' }, '/ws': { - target: 'ws://192.168.50.106:5000', + target: 'ws://localhost:5000', ws: true, }, '/live': { - target: 'ws://192.168.50.106:5000', + target: 'ws://localhost:5000', changeOrigin: true, ws: true, },