Skip to content

Commit

Permalink
馃悰 fix: fix image display error (lobehub#777)
Browse files Browse the repository at this point in the history
  • Loading branch information
arvinxx committed Dec 23, 2023
1 parent ab99e3f commit 08659d6
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/components/FileList/index.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { ImageGallery } from '@lobehub/ui';
import { memo } from 'react';
import { memo, useMemo } from 'react';

import GalleyGrid from '@/components/GalleyGrid';

Expand All @@ -10,9 +10,11 @@ interface FileListProps {
}

const FileList = memo<FileListProps>(({ items }) => {
const data = useMemo(() => items.map((id) => ({ id })), [items]);

return (
<ImageGallery>
<GalleyGrid items={items} renderItem={ImageFileItem} />
<GalleyGrid items={data} renderItem={ImageFileItem} />
</ImageGallery>
);
});
Expand Down

0 comments on commit 08659d6

Please sign in to comment.