Skip to content

Commit

Permalink
move admin badge
Browse files Browse the repository at this point in the history
  • Loading branch information
minhd-vu committed Feb 26, 2024
1 parent fc35c10 commit 369f075
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 5 deletions.
2 changes: 1 addition & 1 deletion components/AdminBadge.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
export default function AdminBadge() {
return <span className="badge badge-primary mx-2">admin</span>;
return <span className="badge badge-primary">admin</span>;
}
6 changes: 2 additions & 4 deletions components/Party.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -73,11 +73,9 @@ export default function Party() {
return (
<li key={player.id}>
<div className="border rounded-lg px-3 py-2 flex justify-between items-center">
<span className="flex items-center">
{player.name}
{party.adminId === player.id && <AdminBadge />}
</span>
<p>{player.name}</p>
<div className="flex space-x-1">
{party.adminId === player.id && <AdminBadge />}
{isAdmin && !isUser && (
<>
<PromotePlayer playerId={player.id} />
Expand Down

0 comments on commit 369f075

Please sign in to comment.