diff --git a/frontend/src/app/(users)/chat/[id]/page.tsx b/frontend/src/app/(users)/chat/[id]/page.tsx index df866bf..af161a1 100644 --- a/frontend/src/app/(users)/chat/[id]/page.tsx +++ b/frontend/src/app/(users)/chat/[id]/page.tsx @@ -2,7 +2,7 @@ import { ContextUser, Room, UserContext } from "@/app/context/getUserContext"; import { useRouter, useParams, redirect } from "next/navigation"; import { FormEvent, useContext, useEffect, useState } from "react"; -import { SideBar } from "../page"; +import SideBar from "@/app/ui/chat/SideBar"; import FriendList from "@/app/ui/chat/FriendList"; import Image from "next/image"; import { SocketContext } from "@/app/context/SocketContext"; diff --git a/frontend/src/app/(users)/chat/page.tsx b/frontend/src/app/(users)/chat/page.tsx index 52b11fb..fc79426 100644 --- a/frontend/src/app/(users)/chat/page.tsx +++ b/frontend/src/app/(users)/chat/page.tsx @@ -33,88 +33,4 @@ export default function Chat() { resolve() }, [user]); if(location) return redirect(location); -} - -export function SideBar({ - username, - rooms, - handleFriend, - toggleFriendButton, - addFriend, - handleClick, - active, -}: { - username: string; - active: string; - handleFriend: () => void; - addFriend: (id: string) => void; - toggleFriendButton: boolean; - handleClick: (id: string) => void; - rooms: { roomId: string, id: string; username: string; imageUrl: string }[]; -}) { - const { id } = useParams(); - return ( -