aboutsummaryrefslogtreecommitdiff
path: root/frontend/src/components/Sidebar/Sidebar.tsx
diff options
context:
space:
mode:
Diffstat (limited to 'frontend/src/components/Sidebar/Sidebar.tsx')
-rw-r--r--frontend/src/components/Sidebar/Sidebar.tsx15
1 files changed, 7 insertions, 8 deletions
diff --git a/frontend/src/components/Sidebar/Sidebar.tsx b/frontend/src/components/Sidebar/Sidebar.tsx
index 1d58d2e..77e23a6 100644
--- a/frontend/src/components/Sidebar/Sidebar.tsx
+++ b/frontend/src/components/Sidebar/Sidebar.tsx
@@ -1,5 +1,5 @@
1import React, { useCallback, useRef } from "react"; 1import React, { useCallback } from "react";
2import { Link, useLocation } from "react-router-dom"; 2import { useLocation } from "react-router-dom";
3import { UserProfile } from "@customTypes/Profile"; 3import { UserProfile } from "@customTypes/Profile";
4 4
5import _Header from "./Header"; 5import _Header from "./Header";
@@ -10,19 +10,18 @@ import links from "./Links";
10 10
11interface SidebarProps { 11interface SidebarProps {
12 setToken: React.Dispatch<React.SetStateAction<string | undefined>>; 12 setToken: React.Dispatch<React.SetStateAction<string | undefined>>;
13 profile?: UserProfile;
14 setProfile: React.Dispatch<React.SetStateAction<UserProfile | undefined>>; 13 setProfile: React.Dispatch<React.SetStateAction<UserProfile | undefined>>;
14 profile?: UserProfile;
15 onUploadRun: () => void; 15 onUploadRun: () => void;
16} 16}
17 17
18const Sidebar: React.FC<SidebarProps> = ({ 18const Sidebar: React.FC<SidebarProps> = ({
19 setToken, 19 setToken,
20 profile,
21 setProfile, 20 setProfile,
21 profile,
22 onUploadRun, 22 onUploadRun,
23}) => { 23}) => {
24 const [isSearching, setIsSearching] = React.useState<boolean>(false); 24 const [isSearching, setIsSearching] = React.useState<boolean>(false);
25 const [isSidebarOpen, setSidebarOpen] = React.useState<boolean>(false);
26 const [selectedButtonIndex, setSelectedButtonIndex] = React.useState<number>(1); 25 const [selectedButtonIndex, setSelectedButtonIndex] = React.useState<number>(1);
27 26
28 const location = useLocation(); 27 const location = useLocation();
@@ -67,14 +66,14 @@ const Sidebar: React.FC<SidebarProps> = ({
67 <div className="flex flex-1 overflow-hidden w-full not-md:hidden "> 66 <div className="flex flex-1 overflow-hidden w-full not-md:hidden ">
68 <div className={`flex flex-col transition-all duration-300 ${isSearching ? "w-[64px]" : "w-full"}`}> 67 <div className={`flex flex-col transition-all duration-300 ${isSearching ? "w-[64px]" : "w-full"}`}>
69 {/* Sidebar Content */} 68 {/* Sidebar Content */}
70 <_Content profile={profile} isSearching={isSearching} selectedButtonIndex={selectedButtonIndex} isSidebarOpen={isSidebarOpen} handle_sidebar_click={handle_sidebar_click} /> 69 <_Content isSearching={isSearching} selectedButtonIndex={selectedButtonIndex} handle_sidebar_click={handle_sidebar_click} />
71 70
72 {/* Bottom Section */} 71 {/* Bottom Section */}
73 <_Footer profile={profile} isSearching={isSearching} selectedButtonIndex={selectedButtonIndex} onUploadRun={onUploadRun} setToken={setToken} setProfile={setProfile} handle_sidebar_click={handle_sidebar_click} /> 72 <_Footer profile={profile} isSearching={isSearching} selectedButtonIndex={selectedButtonIndex} onUploadRun={onUploadRun} handle_sidebar_click={handle_sidebar_click} />
74 </div> 73 </div>
75 74
76 <div className={`flex bg-panel ${isSearching ? 'w-full' : "w-0"}`}> 75 <div className={`flex bg-panel ${isSearching ? 'w-full' : "w-0"}`}>
77 <_Search profile={profile} isSearching={isSearching} /> 76 <_Search profile={profile} />
78 </div> 77 </div>
79 78
80 </div> 79 </div>