Hide Empty trash button for unauthorized roles

- Remove manual conditional rendering in Trash component
- Let the action's built-in visibility logic handle showing/hiding
- Action already checks for both deleted documents and admin role
- Button will now be hidden instead of disabled for non-admin users
This commit is contained in:
codegen-sh[bot]
2025-11-23 19:23:15 +00:00
parent f4d9b6b257
commit 7afc5fed81
+3 -5
View File
@@ -19,11 +19,9 @@ function Trash() {
icon={<TrashIcon />}
title={t("Trash")}
actions={
documents.deleted.length > 0 && (
<Button neutral action={permanentlyDeleteDocumentsInTrash}>
{t("Empty trash")}
</Button>
)
<Button neutral action={permanentlyDeleteDocumentsInTrash}>
{t("Empty trash")}
</Button>
}
>
<Heading>{t("Trash")}</Heading>