1
1
import { Tooltip } from "@mui/joy" ;
2
- import { ArchiveIcon , BellIcon , Globe2Icon , HomeIcon , LogInIcon , PaperclipIcon , SettingsIcon , SmileIcon , User2Icon } from "lucide-react" ;
2
+ import { ArchiveIcon , BellIcon , PaperclipIcon , SettingsIcon , SmileIcon } from "lucide-react" ;
3
3
import { observer } from "mobx-react-lite" ;
4
4
import { useEffect } from "react" ;
5
5
import { NavLink } from "react-router-dom" ;
@@ -37,30 +37,12 @@ const Navigation = observer((props: Props) => {
37
37
userStore . fetchInboxes ( ) ;
38
38
} , [ ] ) ;
39
39
40
- const homeNavLink : NavLinkItem = {
41
- id : "header-home" ,
42
- path : Routes . ROOT ,
43
- title : t ( "common.home" ) ,
44
- icon : < HomeIcon className = "w-6 h-auto opacity-70 shrink-0" /> ,
45
- } ;
46
40
const resourcesNavLink : NavLinkItem = {
47
41
id : "header-resources" ,
48
42
path : Routes . RESOURCES ,
49
43
title : t ( "common.resources" ) ,
50
44
icon : < PaperclipIcon className = "w-6 h-auto opacity-70 shrink-0" /> ,
51
45
} ;
52
- const exploreNavLink : NavLinkItem = {
53
- id : "header-explore" ,
54
- path : Routes . EXPLORE ,
55
- title : t ( "common.explore" ) ,
56
- icon : < Globe2Icon className = "w-6 h-auto opacity-70 shrink-0" /> ,
57
- } ;
58
- const profileNavLink : NavLinkItem = {
59
- id : "header-profile" ,
60
- path : user ? `/u/${ encodeURIComponent ( user . username ) } ` : "" ,
61
- title : t ( "common.profile" ) ,
62
- icon : < User2Icon className = "w-6 h-auto opacity-70 shrink-0" /> ,
63
- } ;
64
46
const inboxNavLink : NavLinkItem = {
65
47
id : "header-inbox" ,
66
48
path : Routes . INBOX ,
@@ -86,29 +68,21 @@ const Navigation = observer((props: Props) => {
86
68
title : t ( "common.settings" ) ,
87
69
icon : < SettingsIcon className = "w-6 h-auto opacity-70 shrink-0" /> ,
88
70
} ;
89
- const signInNavLink : NavLinkItem = {
90
- id : "header-auth" ,
91
- path : Routes . AUTH ,
92
- title : t ( "common.sign-in" ) ,
93
- icon : < LogInIcon className = "w-6 h-auto opacity-70 shrink-0" /> ,
94
- } ;
95
71
const aboutNavLink : NavLinkItem = {
96
72
id : "header-about" ,
97
73
path : Routes . ABOUT ,
98
74
title : t ( "common.about" ) ,
99
75
icon : < SmileIcon className = "w-6 h-auto opacity-70 shrink-0" /> ,
100
76
} ;
101
77
102
- const navLinks : NavLinkItem [ ] = user
103
- ? [ homeNavLink , resourcesNavLink , exploreNavLink , profileNavLink , inboxNavLink , archivedNavLink , settingNavLink ]
104
- : [ exploreNavLink , signInNavLink , aboutNavLink ] ;
78
+ const navLinks : NavLinkItem [ ] = user ? [ resourcesNavLink , inboxNavLink , archivedNavLink , settingNavLink ] : [ aboutNavLink ] ;
105
79
106
80
return (
107
81
< header
108
82
className = { cn ( "w-full h-full overflow-auto flex flex-col justify-start items-start py-4 md:pt-6 z-30 hide-scrollbar" , className ) }
109
83
>
110
84
< UserBanner collapsed = { collapsed } />
111
- < div className = "w-full px-1 py-2 flex flex-col justify-start items-start shrink-0 space-y-2" >
85
+ < div className = "w-full mt-2 px-1 py-2 flex flex-col justify-start items-start shrink-0 space-y-2" >
112
86
{ navLinks . map ( ( navLink ) => (
113
87
< NavLink
114
88
className = { ( { isActive } ) =>
0 commit comments