Match reality

This commit is contained in:
Manav Rathi
2025-02-14 12:12:02 +05:30
parent c6f6041d24
commit 8d701d4fd5
4 changed files with 8 additions and 7 deletions

View File

@@ -112,8 +112,8 @@ export interface PhotoFrameProps {
/** This will be set if mode is "people". */
activePersonID?: string | undefined;
enableDownload?: boolean;
fileToCollectionsMap: Map<number, number[]>;
collectionNameMap: Map<number, string>;
fileToCollectionsMap?: Map<number, number[]>;
collectionNameMap?: Map<number, string>;
showAppDownloadBanner?: boolean;
setIsPhotoSwipeOpen?: (value: boolean) => void;
isInHiddenSection?: boolean;

View File

@@ -103,8 +103,8 @@ export type PhotoViewerProps = Pick<
isInHiddenSection: boolean;
enableDownload: boolean;
setFilesDownloadProgressAttributesCreator: SetFilesDownloadProgressAttributesCreator;
fileToCollectionsMap: Map<number, number[]>;
collectionNameMap: Map<number, string>;
fileToCollectionsMap?: Map<number, number[]>;
collectionNameMap?: Map<number, string>;
onSelectPerson?: FileInfoProps["onSelectPerson"];
};

View File

@@ -546,8 +546,8 @@ export default function PublicCollectionGallery() {
selected={selected}
activeCollectionID={ALL_SECTION}
enableDownload={downloadEnabled}
fileToCollectionsMap={null}
collectionNameMap={null}
fileToCollectionsMap={undefined}
collectionNameMap={undefined}
setFilesDownloadProgressAttributesCreator={
setFilesDownloadProgressAttributesCreator
}

View File

@@ -1,3 +1,4 @@
/* eslint-disable @typescript-eslint/ban-ts-comment */
/* eslint-disable @typescript-eslint/no-unnecessary-condition */
/* eslint-disable @typescript-eslint/no-unused-expressions */
/* TODO: Audit this file */
@@ -319,7 +320,7 @@ export const FileInfo: React.FC<FileInfoProps> = ({
/>
</InfoItem>
)}
{showCollectionChips && (
{showCollectionChips && collectionNameMap && (
<InfoItem icon={<FolderOutlinedIcon />}>
<Stack
direction="row"