update
This commit is contained in:
parent
ccc708ac23
commit
6f7c6b5833
|
|
@ -243,8 +243,6 @@ export default function ArticleTable() {
|
||||||
</Link>
|
</Link>
|
||||||
</DropdownMenuItem>
|
</DropdownMenuItem>
|
||||||
|
|
||||||
{(username === "admin-mabes" ||
|
|
||||||
Number(userId) === article.createdById) && (
|
|
||||||
<DropdownMenuItem asChild>
|
<DropdownMenuItem asChild>
|
||||||
<Link
|
<Link
|
||||||
href={`/admin/article/edit/${article.id}`}
|
href={`/admin/article/edit/${article.id}`}
|
||||||
|
|
@ -254,7 +252,6 @@ export default function ArticleTable() {
|
||||||
Edit
|
Edit
|
||||||
</Link>
|
</Link>
|
||||||
</DropdownMenuItem>
|
</DropdownMenuItem>
|
||||||
)}
|
|
||||||
|
|
||||||
{username === "admin-mabes" && (
|
{username === "admin-mabes" && (
|
||||||
<DropdownMenuItem
|
<DropdownMenuItem
|
||||||
|
|
@ -269,13 +266,10 @@ export default function ArticleTable() {
|
||||||
</DropdownMenuItem>
|
</DropdownMenuItem>
|
||||||
)}
|
)}
|
||||||
|
|
||||||
{(username === "admin-mabes" ||
|
|
||||||
Number(userId) === article.createdById) && (
|
|
||||||
<DropdownMenuItem onClick={() => handleDelete(article.id)}>
|
<DropdownMenuItem onClick={() => handleDelete(article.id)}>
|
||||||
<DeleteIcon className="mr-2 h-4 w-4 text-red-500" />
|
<DeleteIcon className="mr-2 h-4 w-4 text-red-500" />
|
||||||
Delete
|
Delete
|
||||||
</DropdownMenuItem>
|
</DropdownMenuItem>
|
||||||
)}
|
|
||||||
</DropdownMenuContent>
|
</DropdownMenuContent>
|
||||||
</DropdownMenu>
|
</DropdownMenu>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue