diff --git a/frontend/src/components/Navigation/Sidebar.tsx b/frontend/src/components/Navigation/Sidebar.tsx index b8fd535..6cb5e8f 100644 --- a/frontend/src/components/Navigation/Sidebar.tsx +++ b/frontend/src/components/Navigation/Sidebar.tsx @@ -1,4 +1,4 @@ -import React, { useEffect, useState } from "react"; +import React, { useEffect, useState, useRef } from "react"; import { SidebarIcon } from "lucide-react"; import { useNavigate } from "react-router-dom"; import { useAuth } from "../../context/AuthContext"; @@ -26,6 +26,7 @@ const Sidebar: React.FC = ({ extraClasses = "" }) => { const [followedStreamers, setFollowedStreamers] = useState([]); const [followedCategories, setFollowedCategories] = useState([]); const [justToggled, setJustToggled] = useState(false); + const sidebarId = useRef(Math.floor(Math.random() * 1000000)); // Fetch followed streamers useEffect(() => { @@ -107,7 +108,7 @@ const Sidebar: React.FC = ({ extraClasses = "" }) => { )}