Use hidden-inclusive photo count in admin menu
This commit is contained in:
parent
d0496638b3
commit
2e0767ce73
@ -30,9 +30,10 @@ export default function AdminAppMenu({
|
||||
className?: string
|
||||
}) {
|
||||
const {
|
||||
photosCount,
|
||||
uploadsCount,
|
||||
tagsCount,
|
||||
photosCount = 0,
|
||||
photosCountHidden = 0,
|
||||
uploadsCount = 0,
|
||||
tagsCount = 0,
|
||||
selectedPhotoIds,
|
||||
startUpload,
|
||||
setSelectedPhotoIds,
|
||||
@ -40,6 +41,8 @@ export default function AdminAppMenu({
|
||||
clearAuthStateAndRedirect,
|
||||
} = useAppState();
|
||||
|
||||
const photosCountTotal = photosCount + photosCountHidden;
|
||||
|
||||
const isSelecting = selectedPhotoIds !== undefined;
|
||||
|
||||
const items: ComponentProps<typeof MoreMenu>['items'] = [{
|
||||
@ -51,8 +54,8 @@ export default function AdminAppMenu({
|
||||
action: startUpload,
|
||||
}, {
|
||||
label: 'Manage Photos',
|
||||
...photosCount !== undefined && {
|
||||
annotation: `${photosCount}`,
|
||||
...photosCountTotal && {
|
||||
annotation: `${photosCountTotal}`,
|
||||
},
|
||||
icon: <TbPhoto
|
||||
size={15}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user