diff --git a/web/apps/photos/src/components/FileList.tsx b/web/apps/photos/src/components/FileList.tsx index f42bf29cb3..aa9e407bfb 100644 --- a/web/apps/photos/src/components/FileList.tsx +++ b/web/apps/photos/src/components/FileList.tsx @@ -244,16 +244,6 @@ export const FileList: React.FC = ({ [width], ); - const { - // containerWidth, - // isSmallerLayout, - // paddingInline, - columns, - // itemWidth, - // itemHeight, - // gap, - } = layoutParams; - useEffect(() => { // Since width and height are dependencies, there might be too many // updates to the list during a resize. The list computation too, while @@ -500,7 +490,8 @@ export const FileList: React.FC = ({ // eslint-disable-next-line react-hooks/exhaustive-deps const renderListItem = ( listItem: FileListItem, - isScrolling: boolean | undefined, + layoutParams: ThumbnailGridLayoutParams, + isScrolling: boolean, ) => { const haveSelection = selected.count > 0; switch (listItem.tag) { @@ -529,7 +520,7 @@ export const FileList: React.FC = ({ ]) .flat() ) : ( - + {haveSelection && ( = ({ (index >= currentHover! && index <= rangeStart!) } activeCollectionID={activeCollectionID} - showPlaceholder={!!isScrolling} + showPlaceholder={isScrolling} isFav={favoriteFileIDs?.has(file.id)} /> ); @@ -803,8 +794,9 @@ interface FileListItemData { items: FileListItem[]; layoutParams: ThumbnailGridLayoutParams; renderListItem: ( - timeStampListItem: FileListItem, - isScrolling: boolean | undefined, + listItem: FileListItem, + layoutParams: ThumbnailGridLayoutParams, + isScrolling: boolean, ) => React.ReactNode; } @@ -839,7 +831,7 @@ const FileListRow = memo( }, ]} > - {renderListItem(item, isScrolling)} + {renderListItem(item, layoutParams, !!isScrolling)} ); },