11import React , { useRef , useState , useEffect , useCallback } from 'react' ;
22import { NavLink , Link , useLocation , useNavigate } from 'react-router-dom' ;
3- import { motion } from 'framer-motion' ;
3+ import { motion , AnimatePresence } from 'framer-motion' ;
44import {
5- House ,
6- User ,
7- BookOpen ,
8- Wrench ,
9- Article ,
10- SquaresFour ,
11- GearSix ,
12- MagnifyingGlass ,
13- Timer ,
14- PushPin ,
15- Trophy ,
16- Shuffle ,
17- EnvelopeSimple ,
18- BugBeetle ,
19- ArrowRight ,
20- Sword ,
21- Rss ,
22- Graph ,
23- CaretDoubleDown ,
24- CaretDoubleUp ,
25- Flask ,
26- BookBookmark ,
27- FilePdf ,
5+ HouseIcon ,
6+ UserIcon ,
7+ BookOpenIcon ,
8+ WrenchIcon ,
9+ ArticleIcon ,
10+ SquaresFourIcon ,
11+ GearSixIcon ,
12+ MagnifyingGlassIcon ,
13+ TimerIcon ,
14+ PushPinIcon ,
15+ TrophyIcon ,
16+ ShuffleIcon ,
17+ EnvelopeSimpleIcon ,
18+ BugBeetleIcon ,
19+ ArrowRightIcon ,
20+ SwordIcon ,
21+ RssIcon ,
22+ GraphIcon ,
23+ CaretDoubleDownIcon ,
24+ CaretDoubleUpIcon ,
25+ FlaskIcon ,
26+ BookBookmarkIcon ,
27+ FilePdfIcon ,
2828 TerminalWindowIcon
2929} from '@phosphor-icons/react' ;
3030
@@ -35,30 +35,30 @@ import { useAchievements } from '../context/AchievementContext';
3535import piml from 'piml' ;
3636
3737const ICON_MAP = {
38- HouseIcon : House ,
39- UserIcon : User ,
40- BookOpenIcon : BookOpen ,
41- WrenchIcon : Wrench ,
42- ArticleIcon : Article ,
43- SquaresFourIcon : SquaresFour ,
44- GearSixIcon : GearSix ,
45- MagnifyingGlassIcon : MagnifyingGlass ,
46- TimerIcon : Timer ,
47- PushPinIcon : PushPin ,
48- TrophyIcon : Trophy ,
49- ShuffleIcon : Shuffle ,
50- EnvelopeSimpleIcon : EnvelopeSimple ,
51- BugBeetleIcon : BugBeetle ,
52- ArrowRightIcon : ArrowRight ,
53- SwordIcon : Sword ,
54- RssIcon : Rss ,
55- GraphIcon : Graph ,
56- CaretDoubleDownIcon : CaretDoubleDown ,
57- CaretDoubleUpIcon : CaretDoubleUp ,
58- FlaskIcon : Flask ,
59- BookBookmarkIcon : BookBookmark ,
60- FilePdfIcon : FilePdf ,
61- TerminalWindowIcon : TerminalWindowIcon
38+ HouseIcon,
39+ UserIcon,
40+ BookOpenIcon,
41+ WrenchIcon,
42+ ArticleIcon,
43+ SquaresFourIcon,
44+ GearSixIcon,
45+ MagnifyingGlassIcon,
46+ TimerIcon,
47+ PushPinIcon,
48+ TrophyIcon,
49+ ShuffleIcon,
50+ EnvelopeSimpleIcon,
51+ BugBeetleIcon,
52+ ArrowRightIcon,
53+ SwordIcon,
54+ RssIcon,
55+ GraphIcon,
56+ CaretDoubleDownIcon,
57+ CaretDoubleUpIcon,
58+ FlaskIcon,
59+ BookBookmarkIcon,
60+ FilePdfIcon,
61+ TerminalWindowIcon
6262} ;
6363
6464const LuxeSidebar = ( {
@@ -203,7 +203,7 @@ const LuxeSidebar = ({
203203 </ span >
204204 </ Link >
205205 < span className = "font-outfit text-[10px] text-[#1A1A1A]/40 uppercase tracking-widest pl-1" >
206- System v{ version }
206+ Fezcodex v{ version }
207207 </ span >
208208 </ div >
209209
@@ -213,7 +213,7 @@ const LuxeSidebar = ({
213213 < div className = "relative flex-grow overflow-hidden" >
214214 { showScrollGradient . top && (
215215 < div className = "absolute top-0 left-0 right-0 h-12 flex items-center justify-center bg-gradient-to-b from-[#FDFCFB] to-transparent z-20 pointer-events-none" >
216- < CaretDoubleUp size = { 16 } className = "text-[#8D4004] mt-2" />
216+ < CaretDoubleUpIcon size = { 16 } className = "text-[#8D4004] mt-2" />
217217 </ div >
218218 ) }
219219
@@ -254,7 +254,7 @@ const LuxeSidebar = ({
254254 className = "flex flex-col overflow-hidden"
255255 >
256256 { items . map ( ( item , idx ) => {
257- const Icon = ICON_MAP [ item . icon ] || ArrowRight ;
257+ const Icon = ICON_MAP [ item . icon ] || ArrowRightIcon ;
258258 if ( item . external === 'true' || item . url ) {
259259 return (
260260 < a
@@ -270,7 +270,7 @@ const LuxeSidebar = ({
270270 { item . label }
271271 </ span >
272272 </ div >
273- < ArrowRight
273+ < ArrowRightIcon
274274 size = { 12 }
275275 className = "opacity-0 group-hover:opacity-100 -translate-x-2 group-hover:translate-x-0 transition-all text-[#8D4004]"
276276 />
@@ -297,7 +297,7 @@ const LuxeSidebar = ({
297297
298298 { showScrollGradient . bottom && (
299299 < div className = "absolute bottom-0 left-0 right-0 h-12 flex items-center justify-center bg-gradient-to-t from-[#FDFCFB] to-transparent z-20 pointer-events-none" >
300- < CaretDoubleDown size = { 16 } className = "text-[#8D4004] mb-2" />
300+ < CaretDoubleDownIcon size = { 16 } className = "text-[#8D4004] mb-2" />
301301 </ div >
302302 ) }
303303 </ div >
@@ -306,25 +306,25 @@ const LuxeSidebar = ({
306306 < div className = "grid grid-cols-4 gap-2 mb-4" >
307307 < FooterButton
308308 onClick = { ( ) => setIsPaletteOpen ( true ) }
309- icon = { MagnifyingGlass }
309+ icon = { MagnifyingGlassIcon }
310310 title = "Search"
311311 />
312312 < FooterButton
313313 onClick = { ( ) => navigate ( '/settings' ) }
314- icon = { GearSix }
314+ icon = { GearSixIcon }
315315 title = "Config"
316316 />
317317 < FooterButton
318318 onClick = { ( ) => {
319319 navigate ( '/random' ) ;
320320 unlockAchievement ( 'feeling_lucky' ) ;
321321 } }
322- icon = { Shuffle }
322+ icon = { ShuffleIcon }
323323 title = "Random"
324324 />
325325 < FooterButton
326326 onClick = { toggleModal }
327- icon = { EnvelopeSimple }
327+ icon = { EnvelopeSimpleIcon }
328328 title = "Contact"
329329 />
330330 </ div >
@@ -337,7 +337,7 @@ const LuxeSidebar = ({
337337const SidebarLink = ( { to, icon : Icon , label, getLinkClass } ) => (
338338 < NavLink to = { to } className = { getLinkClass } >
339339 < div className = "flex items-center gap-4" >
340- < Icon size = { 16 } />
340+ { Icon && < Icon size = { 16 } /> }
341341 < span className = "font-outfit text-xs font-medium uppercase tracking-widest" >
342342 { label }
343343 </ span >
@@ -355,7 +355,4 @@ const FooterButton = ({ onClick, icon: Icon, title }) => (
355355 </ button >
356356) ;
357357
358- // Helper for animation
359- const AnimatePresence = ( { children, initial } ) => React . Children . only ( children ) ;
360-
361358export default LuxeSidebar ;
0 commit comments