feat: 💨

This commit is contained in:
codytseng
2025-09-13 23:36:49 +08:00
parent f785d0d8a2
commit 206cbf7e19
5 changed files with 46 additions and 13 deletions

View File

@@ -14,12 +14,14 @@ export default function ImageGallery({
className,
images,
start = 0,
end = images.length
end = images.length,
mustLoad = false
}: {
className?: string
images: TImetaInfo[]
start?: number
end?: number
mustLoad?: boolean
}) {
const id = useMemo(() => `image-gallery-${randomString()}`, [])
const { autoLoadMedia } = useContentPolicy()
@@ -42,7 +44,7 @@ export default function ImageGallery({
const displayImages = images.slice(start, end)
if (!autoLoadMedia) {
if (!mustLoad && !autoLoadMedia) {
return displayImages.map((image, i) => (
<ImageWithLightbox
key={i}