diff --git a/src/container/Sidebar/Sidebar.tsx b/src/container/Sidebar/Sidebar.tsx index 2d061f9d..e122d3b1 100644 --- a/src/container/Sidebar/Sidebar.tsx +++ b/src/container/Sidebar/Sidebar.tsx @@ -4,6 +4,8 @@ import { SidebarButton } from '@/container/Sidebar/SidebarButton'; import { Icon } from '@/system/components'; import { useState } from 'react'; import { Collapsible } from './Collapsible/Collapsible'; +import { useRouter, usePathname } from 'next/navigation'; +import { MY_RECRUIT_PATH, MY_INFO_PATH } from '@/route'; // FIXME: const SELECTED = true; @@ -13,6 +15,8 @@ const SIDEBAR_CLASSNAME = { } as const; export function Sidebar() { + const router = useRouter(); + const pathname = usePathname(); const [expanded, setExpanded] = useState(false); const [myInfoCollapsed, setMyInfoCollapsed] = useState(true); const [myJDCollapsed, setMyJDCollapsed] = useState(true); @@ -39,38 +43,41 @@ export function Sidebar() { } + onClick={() => router.push(MY_INFO_PATH)} /> {/* FIXME: */} -
열렸다!
+
준비중이에요!
} + onClick={() => router.push(MY_RECRUIT_PATH)} /> -
열렸다!
+
준비중이에요!
diff --git a/src/container/Sidebar/SidebarButton.tsx b/src/container/Sidebar/SidebarButton.tsx index 8b08d02c..8d26f007 100644 --- a/src/container/Sidebar/SidebarButton.tsx +++ b/src/container/Sidebar/SidebarButton.tsx @@ -12,6 +12,7 @@ interface SidebarButtonProps { expandedText?: string; withTouchEffect?: boolean; withHoverEffect?: boolean; + onClick?: () => void; } const DEFAULT_COLOR = '#F9F9FA'; @@ -25,6 +26,7 @@ export function SidebarButton({ expandedText, withTouchEffect = true, withHoverEffect = true, + onClick, }: SidebarButtonProps) { const showTooltip = !expanded; @@ -33,7 +35,8 @@ export function SidebarButton({ className="relative p-[6px] w-full flex justify-between items-center" variants={{ touch: { scale: 0.96 } }} whileTap={withTouchEffect ? 'touch' : undefined} - whileHover={withHoverEffect ? 'hover' : undefined}> + whileHover={withHoverEffect ? 'hover' : undefined} + onClick={onClick}>