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
526f4680
Commit
526f4680
authored
Mar 29, 2024
by
Steven
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
chore: tweak user list display
parent
bfaf0658
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
24 additions
and
20 deletions
+24
-20
UserList.tsx
web/src/components/UserList.tsx
+24
-20
No files found.
web/src/components/UserList.tsx
View file @
526f4680
...
@@ -20,27 +20,31 @@ const UserList = () => {
...
@@ -20,27 +20,31 @@ const UserList = () => {
},
[]);
},
[]);
return
(
return
(
<
div
className=
"w-full mt-2 flex flex-col p-2 bg-gray-50 dark:bg-black rounded-lg"
>
users
.
length
>
0
&&
(
<
div
className=
"w-full flex flex-row justify-between items-center"
>
<
div
className=
"w-full mt-2 flex flex-col p-2 bg-gray-50 dark:bg-black rounded-lg"
>
<
span
className=
"text-gray-400 font-medium text-sm pl-1"
>
Users
</
span
>
<
div
className=
"w-full flex flex-row justify-between items-center"
>
<
IconButton
size=
"sm"
onClick=
{
fetchRecommendUsers
}
>
<
span
className=
"text-gray-400 font-medium text-sm pl-1"
>
Users
</
span
>
<
Icon
.
RefreshCcw
className=
"text-gray-400 w-4 h-auto"
/>
<
IconButton
size=
"sm"
onClick=
{
fetchRecommendUsers
}
>
</
IconButton
>
<
Icon
.
RefreshCcw
className=
"text-gray-400 w-4 h-auto"
/>
</
div
>
</
IconButton
>
{
users
.
map
((
user
)
=>
(
<
div
key=
{
user
.
name
}
className=
"w-full flex flex-row justify-start items-center px-2 py-1.5 hover:bg-gray-100 dark:hover:bg-zinc-900 rounded-lg"
>
<
Link
className=
"w-full flex flex-row items-center"
to=
{
`/u/${encodeURIComponent(user.username)}`
}
unstable_viewTransition
>
<
UserAvatar
className=
"mr-2 shrink-0"
avatarUrl=
{
user
.
avatarUrl
}
/>
<
div
className=
"w-full flex flex-col justify-center items-start"
>
<
span
className=
"text-gray-600 leading-tight max-w-[80%] truncate dark:text-gray-400"
>
{
user
.
nickname
||
user
.
username
}
</
span
>
</
div
>
</
Link
>
</
div
>
</
div
>
))
}
{
users
.
map
((
user
)
=>
(
</
div
>
<
div
key=
{
user
.
name
}
className=
"w-full flex flex-row justify-start items-center px-2 py-1.5 hover:bg-gray-100 dark:hover:bg-zinc-900 rounded-lg"
>
<
Link
className=
"w-full flex flex-row items-center"
to=
{
`/u/${encodeURIComponent(user.username)}`
}
unstable_viewTransition
>
<
UserAvatar
className=
"mr-2 shrink-0"
avatarUrl=
{
user
.
avatarUrl
}
/>
<
div
className=
"w-full flex flex-col justify-center items-start"
>
<
span
className=
"text-gray-600 leading-tight max-w-[80%] truncate dark:text-gray-400"
>
{
user
.
nickname
||
user
.
username
}
</
span
>
</
div
>
</
Link
>
</
div
>
))
}
</
div
>
)
);
);
};
};
...
...
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