Use hidden-inclusive photo count in admin menu

This commit is contained in:
Sam Becker 2025-02-28 00:19:43 -06:00
parent d0496638b3
commit 2e0767ce73

View File

@ -30,9 +30,10 @@ export default function AdminAppMenu({
className?: string className?: string
}) { }) {
const { const {
photosCount, photosCount = 0,
uploadsCount, photosCountHidden = 0,
tagsCount, uploadsCount = 0,
tagsCount = 0,
selectedPhotoIds, selectedPhotoIds,
startUpload, startUpload,
setSelectedPhotoIds, setSelectedPhotoIds,
@ -40,6 +41,8 @@ export default function AdminAppMenu({
clearAuthStateAndRedirect, clearAuthStateAndRedirect,
} = useAppState(); } = useAppState();
const photosCountTotal = photosCount + photosCountHidden;
const isSelecting = selectedPhotoIds !== undefined; const isSelecting = selectedPhotoIds !== undefined;
const items: ComponentProps<typeof MoreMenu>['items'] = [{ const items: ComponentProps<typeof MoreMenu>['items'] = [{
@ -51,8 +54,8 @@ export default function AdminAppMenu({
action: startUpload, action: startUpload,
}, { }, {
label: 'Manage Photos', label: 'Manage Photos',
...photosCount !== undefined && { ...photosCountTotal && {
annotation: `${photosCount}`, annotation: `${photosCountTotal}`,
}, },
icon: <TbPhoto icon: <TbPhoto
size={15} size={15}