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
039b6b24
Unverified
Commit
039b6b24
authored
Feb 26, 2023
by
boojack
Committed by
GitHub
Feb 26, 2023
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
chore: remove username click event (#1167)
chore: remove user name click event
parent
a09b2c4e
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
11 deletions
+3
-11
UserBanner.tsx
web/src/components/UserBanner.tsx
+3
-11
No files found.
web/src/components/UserBanner.tsx
View file @
039b6b24
import
{
use
Callback
,
use
Effect
,
useState
}
from
"react"
;
import
{
useEffect
,
useState
}
from
"react"
;
import
{
useTranslation
}
from
"react-i18next"
;
import
{
use
LocationStore
,
use
MemoStore
,
useTagStore
,
useUserStore
}
from
"../store/module"
;
import
{
useMemoStore
,
useTagStore
,
useUserStore
}
from
"../store/module"
;
import
{
getMemoStats
}
from
"../helpers/api"
;
import
*
as
utils
from
"../helpers/utils"
;
import
Dropdown
from
"./common/Dropdown"
;
...
...
@@ -10,7 +10,6 @@ import UserAvatar from "./UserAvatar";
const
UserBanner
=
()
=>
{
const
{
t
}
=
useTranslation
();
const
locationStore
=
useLocationStore
();
const
userStore
=
useUserStore
();
const
memoStore
=
useMemoStore
();
const
tagStore
=
useTagStore
();
...
...
@@ -45,10 +44,6 @@ const UserBanner = () => {
});
},
[
memos
]);
const
handleUsernameClick
=
useCallback
(()
=>
{
locationStore
.
clearQuery
();
},
[]);
const
handleArchivedBtnClick
=
()
=>
{
showArchivedMemoDialog
();
};
...
...
@@ -68,10 +63,7 @@ const UserBanner = () => {
<
Dropdown
className=
"w-full"
trigger=
{
<
div
className=
"px-2 py-1 max-w-full flex flex-row justify-start items-center cursor-pointer rounded hover:shadow hover:bg-white dark:hover:bg-zinc-700"
onClick=
{
handleUsernameClick
}
>
<
div
className=
"px-2 py-1 max-w-full flex flex-row justify-start items-center cursor-pointer rounded hover:shadow hover:bg-white dark:hover:bg-zinc-700"
>
<
UserAvatar
avatarUrl=
{
user
?.
avatarUrl
}
/>
<
span
className=
"px-1 text-lg font-medium text-slate-800 dark:text-gray-200 shrink truncate"
>
{
username
}
</
span
>
{
!
isVisitorMode
&&
user
?.
role
===
"HOST"
?
(
...
...
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