Add resiliency to <AdminNav />
This commit is contained in:
parent
3ad0e6d2f3
commit
6c07cdec90
@ -16,14 +16,14 @@ export default async function AdminNav() {
|
||||
countUploads,
|
||||
countTags,
|
||||
] = await Promise.all([
|
||||
getPhotosCountIncludingHiddenCached(),
|
||||
getPhotosCountIncludingHiddenCached().catch(() => 0),
|
||||
getStorageUploadUrlsNoStore()
|
||||
.then(urls => urls.length)
|
||||
.catch(e => {
|
||||
console.error(`Error getting blob upload urls: ${e}`);
|
||||
return 0;
|
||||
}),
|
||||
getUniqueTagsCached().then(tags => tags.length),
|
||||
getUniqueTagsCached().then(tags => tags.length).catch(() => 0),
|
||||
]);
|
||||
|
||||
const navItemPhotos = {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user