Don't show the edit button if the user can't edit/delete any links

This commit is contained in:
Isaac Wise
2024-02-12 01:54:47 -06:00
parent 1cff2db876
commit a3c487d074
4 changed files with 18 additions and 16 deletions
+1 -1
View File
@@ -81,7 +81,7 @@ export default function Links() {
/>
<div className="mt-2 flex items-center justify-end gap-2">
{links.length > 0 && (
{links.length > 0 && (collectivePermissions === true || collectivePermissions?.canUpdate || collectivePermissions?.canDelete) && (
<div
role="button"
onClick={() => {
+1 -1
View File
@@ -80,7 +80,7 @@ export default function PinnedLinks() {
description={"Pinned Links from your Collections"}
/>
<div className="mt-2 flex items-center justify-end gap-2">
{!(links.length === 0) && (
{links.length > 0 && (collectivePermissions === true || collectivePermissions?.canUpdate || collectivePermissions?.canDelete) && (
<div
role="button"
onClick={() => {