minor improvement

This commit is contained in:
daniel31x13
2024-02-13 14:35:31 -05:00
parent 0b2e78332a
commit 41df9d0c82
2 changed files with 15 additions and 7 deletions
+10 -1
View File
@@ -15,6 +15,7 @@ import { isPWA } from "@/lib/client/utils";
import { generateLinkHref } from "@/lib/client/generateLinkHref";
import useAccountStore from "@/store/account";
import usePermissions from "@/hooks/usePermissions";
import toast from "react-hot-toast";
type Props = {
link: LinkIncludingShortenedCollectionAndTags;
@@ -92,7 +93,15 @@ export default function LinkCardCompact({
className={`${selectedStyle} border relative items-center flex ${
!showInfo && !isPWA() ? "hover:bg-base-300 p-3" : "py-3"
} duration-200 rounded-lg`}
onClick={() => selectable && handleCheckboxClick(link)}
onClick={() =>
selectable
? handleCheckboxClick(link)
: editMode
? toast.error(
"You don't have permission to edit or delete this item."
)
: undefined
}
>
{/* {showCheckbox &&
editMode &&