Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
C
canifa_note
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Vũ Hoàng Anh
canifa_note
Commits
fc7dc587
Commit
fc7dc587
authored
Mar 13, 2025
by
Johnny
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
chore: move archived route
parent
e8e393a9
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
10 deletions
+8
-10
HomeSidebar.tsx
web/src/components/HomeSidebar/HomeSidebar.tsx
+2
-8
UserBanner.tsx
web/src/components/UserBanner.tsx
+6
-2
No files found.
web/src/components/HomeSidebar/HomeSidebar.tsx
View file @
fc7dc587
import
{
last
}
from
"lodash-es"
;
import
{
last
}
from
"lodash-es"
;
import
{
ArchiveIcon
,
Globe2Icon
,
HomeIcon
}
from
"lucide-react"
;
import
{
Globe2Icon
,
HomeIcon
}
from
"lucide-react"
;
import
{
observer
}
from
"mobx-react-lite"
;
import
{
observer
}
from
"mobx-react-lite"
;
import
{
matchPath
,
NavLink
,
useLocation
}
from
"react-router-dom"
;
import
{
matchPath
,
NavLink
,
useLocation
}
from
"react-router-dom"
;
import
useDebounce
from
"react-use/lib/useDebounce"
;
import
useDebounce
from
"react-use/lib/useDebounce"
;
...
@@ -44,14 +44,8 @@ const HomeSidebar = observer((props: Props) => {
...
@@ -44,14 +44,8 @@ const HomeSidebar = observer((props: Props) => {
title
:
t
(
"common.explore"
),
title
:
t
(
"common.explore"
),
icon
:
<
Globe2Icon
className=
"w-4 h-auto opacity-70 shrink-0"
/>,
icon
:
<
Globe2Icon
className=
"w-4 h-auto opacity-70 shrink-0"
/>,
};
};
const
archivedNavLink
:
NavLinkItem
=
{
id
:
"header-archived"
,
path
:
Routes
.
ARCHIVED
,
title
:
t
(
"common.archived"
),
icon
:
<
ArchiveIcon
className=
"w-4 h-auto opacity-70 shrink-0"
/>,
};
const
navLinks
:
NavLinkItem
[]
=
currentUser
?
[
homeNavLink
,
exploreNavLink
,
archivedNavLink
]
:
[
exploreNavLink
];
const
navLinks
:
NavLinkItem
[]
=
currentUser
?
[
homeNavLink
,
exploreNavLink
]
:
[
exploreNavLink
];
useDebounce
(
useDebounce
(
async
()
=>
{
async
()
=>
{
...
...
web/src/components/UserBanner.tsx
View file @
fc7dc587
import
{
Dropdown
,
Menu
,
MenuButton
,
MenuItem
}
from
"@mui/joy"
;
import
{
Dropdown
,
Menu
,
MenuButton
,
MenuItem
}
from
"@mui/joy"
;
import
{
LogOutIcon
,
User2Icon
,
Smile
Icon
}
from
"lucide-react"
;
import
{
ArchiveIcon
,
LogOutIcon
,
User2Icon
,
SquareUser
Icon
}
from
"lucide-react"
;
import
{
authServiceClient
}
from
"@/grpcweb"
;
import
{
authServiceClient
}
from
"@/grpcweb"
;
import
useCurrentUser
from
"@/hooks/useCurrentUser"
;
import
useCurrentUser
from
"@/hooks/useCurrentUser"
;
import
useNavigateTo
from
"@/hooks/useNavigateTo"
;
import
useNavigateTo
from
"@/hooks/useNavigateTo"
;
...
@@ -47,9 +47,13 @@ const UserBanner = (props: Props) => {
...
@@ -47,9 +47,13 @@ const UserBanner = (props: Props) => {
</
MenuButton
>
</
MenuButton
>
<
Menu
placement=
"bottom-start"
style=
{
{
zIndex
:
"9999"
}
}
>
<
Menu
placement=
"bottom-start"
style=
{
{
zIndex
:
"9999"
}
}
>
<
MenuItem
onClick=
{
()
=>
navigateTo
(
`/u/${encodeURIComponent(currentUser.username)}`
)
}
>
<
MenuItem
onClick=
{
()
=>
navigateTo
(
`/u/${encodeURIComponent(currentUser.username)}`
)
}
>
<
S
mile
Icon
className=
"w-4 h-auto opacity-60"
/>
<
S
quareUser
Icon
className=
"w-4 h-auto opacity-60"
/>
<
span
className=
"truncate"
>
{
t
(
"common.profile"
)
}
</
span
>
<
span
className=
"truncate"
>
{
t
(
"common.profile"
)
}
</
span
>
</
MenuItem
>
</
MenuItem
>
<
MenuItem
onClick=
{
()
=>
navigateTo
(
Routes
.
ARCHIVED
)
}
>
<
ArchiveIcon
className=
"w-4 h-auto opacity-60"
/>
<
span
className=
"truncate"
>
{
t
(
"common.archived"
)
}
</
span
>
</
MenuItem
>
<
MenuItem
onClick=
{
handleSignOut
}
>
<
MenuItem
onClick=
{
handleSignOut
}
>
<
LogOutIcon
className=
"w-4 h-auto opacity-60"
/>
<
LogOutIcon
className=
"w-4 h-auto opacity-60"
/>
<
span
className=
"truncate"
>
{
t
(
"common.sign-out"
)
}
</
span
>
<
span
className=
"truncate"
>
{
t
(
"common.sign-out"
)
}
</
span
>
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment