33import React , { useState } from "react" ;
44import Link from "next/link" ;
55import SidebarItem from "../sidebar/SidebarItem" ;
6- import { usePathname , useRouter } from "next/navigation" ;
6+ import { useRouter } from "next/navigation" ;
77import { IconWrapper } from "../ui/IconWrapper" ;
88import {
99 XMarkIcon ,
@@ -41,15 +41,9 @@ const SIDEBAR_ROUTES = [
4141 } ,
4242] ;
4343
44- const getSidebarLinkClassName = ( currentPath : string , routePath : string ) => {
45- const isActive = currentPath === routePath ;
46- return `${ isActive ? "text-ox-purple" : "text-ox-white" } ` ;
47- } ;
48-
4944export default function Sidebar ( ) {
5045 const { showSidebar, setShowSidebar, isCollapsed, toggleCollapsed } =
5146 useShowSidebar ( ) ;
52- const pathname = usePathname ( ) ;
5347 const router = useRouter ( ) ;
5448 const { isPaidUser } = useSubscription ( ) ;
5549
@@ -74,7 +68,7 @@ export default function Sidebar() {
7468 } `}
7569 >
7670 { /* Mobile header */ }
77- < div className = "flex justify-between px-4 py- 4 border-b border-ox-header xl:hidden bg-ox-sidebar " >
71+ < div className = "flex justify-between items-center h-16 px- 4 border-b border-ox-header xl:hidden bg-ox-sideba " >
7872 < div className = "flex items-center" >
7973 < Link
8074 href = "/"
@@ -110,11 +104,10 @@ export default function Sidebar() {
110104 </ IconWrapper >
111105 </ div >
112106
113- < div className = "sidebar-body flex-grow flex-col overflow-y-auto px-3 py-4 space-y-1 " >
107+ < div className = "sidebar-body flex-grow flex-col overflow-y-auto px-3 py-4" >
114108 { SIDEBAR_ROUTES . map ( ( route ) => {
115- const activeClass = getSidebarLinkClassName ( pathname , route . path ) ;
116109 return (
117- < Link href = { route . path } className = { activeClass } key = { route . path } >
110+ < Link href = { route . path } key = { route . path } >
118111 < SidebarItem
119112 itemName = { route . label }
120113 icon = { route . icon }
@@ -131,14 +124,14 @@ export default function Sidebar() {
131124 />
132125 { ! isCollapsed && ! isPaidUser ? (
133126 < div
134- className = "w-full h-[44px] flex items-center rounded-md cursor-pointer transition-colors px-2 gap-3 pl-3 hover:bg-[#121214] "
127+ className = "w-full h-[44px] flex items-center rounded-md cursor-pointer transition-colors px-2 gap-3 pl-3 hover:bg-[#292929] group "
135128 onClick = { proClickHandler }
136129 >
137- < span className = "shrink-0 text-[#eaeaea]" >
130+ < span className = "shrink-0 text-[#eaeaea] group-hover:text-white transition-colors " >
138131 < StarIcon className = "size-5" />
139132 </ span >
140133 < div className = "flex items-center gap-1" >
141- < h1 className = "text-xs font-medium text-[#c8c8c8] group-hover:text-ox-purple " >
134+ < h1 className = "text-xs font-medium text-[#c8c8c8] group-hover:text-white transition-colors " >
142135 Opensox Pro
143136 </ h1 >
144137 < OpensoxProBadge className = "px-1.5 py-0.5 scale-75" />
@@ -189,7 +182,7 @@ function ProfileMenu({ isCollapsed }: { isCollapsed: boolean }) {
189182 return (
190183 < div className = "px-3 py-4 border-t border-ox-header bg-ox-sidebar relative profile-menu-container" >
191184 < div
192- className = { `group flex items-center rounded-md bg-ox-content border border-ox-header p-2 transition-all duration-300 ease-out cursor-pointer ${
185+ className = { `group flex items-center rounded-md bg-ox-profile-card border border-ox-header p-2 transition-all duration-300 ease-out cursor-pointer ${
193186 isCollapsed ? "justify-center" : "gap-3"
194187 } `}
195188 onClick = { ( ) => setOpen ( ( s ) => ! s ) }
@@ -211,7 +204,7 @@ function ProfileMenu({ isCollapsed }: { isCollapsed: boolean }) {
211204 </ div >
212205 { /* Profile Card Dropdown */ }
213206 { ! isCollapsed && open && (
214- < div className = "absolute bottom-full left-3 right-3 mb-2 bg-ox-content border border-ox-header rounded-lg shadow-xl overflow-hidden z-50" >
207+ < div className = "absolute bottom-full left-3 right-3 mb-2 bg-ox-profile-card border border-ox-header rounded-lg shadow-xl overflow-hidden z-50" >
215208 { /* User Info Section */ }
216209 < div className = "p-3 border-b border-ox-header" >
217210 < div className = "flex items-center gap-3" >
0 commit comments