diff --git a/Frontend/src/containers/login-container.tsx b/Frontend/src/containers/login-container.tsx
index 038f189..db681c2 100644
--- a/Frontend/src/containers/login-container.tsx
+++ b/Frontend/src/containers/login-container.tsx
@@ -39,7 +39,12 @@ export const LoginContainer: FC = () => {
},
});
} catch (error: any) {
- openNotification({ type: "error", message: error.response.data.message });
+ openNotification({
+ type: "error",
+ message: error?.response?.data
+ ? error.response?.data?.message
+ : error.message,
+ });
} finally {
setIsLoading(false);
}
diff --git a/Frontend/src/containers/video-stream-container.tsx b/Frontend/src/containers/video-stream-container.tsx
index d3066f2..dd32754 100644
--- a/Frontend/src/containers/video-stream-container.tsx
+++ b/Frontend/src/containers/video-stream-container.tsx
@@ -2,9 +2,8 @@
import type { FC } from "react";
import { Tooltip } from "antd";
import { VideoRecordingScreen } from "@/components";
-import { useCameraSlice, useSessionSlice } from "@/hooks";
+import { useCameraSlice } from "@/hooks";
import { FullscreenOutlined, FullscreenExitOutlined } from "@ant-design/icons";
-import { io } from "socket.io-client";
import React from "react";
type PropsType = {
@@ -17,20 +16,6 @@ export const VideoStreamContainer: FC
= ({ sizePerScreen = 9 }) => {
const { cameras, isFullScreenGrid, toggleIsFullScreenGrid } =
useCameraSlice();
- const { session } = useSessionSlice();
-
- /* websocket */
- const webSocketUrl = process.env.NEXT_PUBLIC_BACKENDXXX_URL
- ? process.env.NEXT_PUBLIC_BACKENDXXX_URL
- : "";
-
- const socket = io(webSocketUrl, {
- transports: ["websocket", "polling", "flashsocket"],
- auth: {
- token: `Bearer ddd${session.accessToken}`,
- },
- });
-
/* event handlers */
const onScreenSizeClick = () => {
const elem = document.documentElement;
@@ -51,7 +36,6 @@ export const VideoStreamContainer: FC = ({ sizePerScreen = 9 }) => {
{Array.from({ length: sizePerScreen }).map((item, index) => (
diff --git a/Frontend/src/data/camera-data.tsx b/Frontend/src/data/camera-data.tsx
index 02eaeac..b308482 100644
--- a/Frontend/src/data/camera-data.tsx
+++ b/Frontend/src/data/camera-data.tsx
@@ -1,3 +1,4 @@
+"use client";
import { Camera } from "@/types";
export const cameras: Camera[] = [
@@ -5,7 +6,7 @@ export const cameras: Camera[] = [
key: "backyard",
name: "Backyard",
isActive: true,
- url: "https://www.youtube.com/embed/Sv2h-csnlps?modestbranding=1&showinfo=0&controls=0&autoplay=1&mute=1",
+ url: "http://localhost:8080/hls/1",
},
{
key: "main-road",
diff --git a/Frontend/src/store/slices/camera-slice.ts b/Frontend/src/store/slices/camera-slice.ts
index 61a3590..ccb6c04 100644
--- a/Frontend/src/store/slices/camera-slice.ts
+++ b/Frontend/src/store/slices/camera-slice.ts
@@ -1,3 +1,4 @@
+"use client";
import { createSlice } from "@reduxjs/toolkit";
import type { PayloadAction } from "@reduxjs/toolkit";
import type { RootState } from "../store";
diff --git a/Frontend/tsconfig.json b/Frontend/tsconfig.json
index 299c000..a0b4524 100644
--- a/Frontend/tsconfig.json
+++ b/Frontend/tsconfig.json
@@ -5,7 +5,7 @@
"allowJs": true,
"skipLibCheck": true,
"strict": true,
- "noEmit": true,
+ "noEmit": true,
"esModuleInterop": true,
"module": "esnext",
"moduleResolution": "bundler",