mirror of
https://github.com/outline/outline.git
synced 2026-06-13 11:25:03 +03:00
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:
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user