Skip to content

Commit

Permalink
fix(gallery): 🐛 unique indices
Browse files Browse the repository at this point in the history
  • Loading branch information
Nudelsuppe42 committed Apr 23, 2024
1 parent a8d6e41 commit 0dce079
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/components/GalleryGrid.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import { AnimatePresence, motion } from 'framer-motion';
import {
Avatar,
Badge,
Expand All @@ -9,12 +8,13 @@ import {
Title,
useMantineTheme,
} from '@mantine/core';
import { AnimatePresence, motion } from 'framer-motion';

import BackgroundImage from './BackgroundImage';
import { useHover } from '@mantine/hooks';
import Link from 'next/link';
import React from 'react';
import { useHover } from '@mantine/hooks';
import { useIsClient } from '../hooks/useIsClient';
import BackgroundImage from './BackgroundImage';

interface GalleryGridProps {
images: GalleryGridImageProps[];
Expand All @@ -38,7 +38,7 @@ function GalleryGrid(props: GalleryGridProps) {
return (
<Grid gutter={props.gap || 'md'} style={props.style}>
{props.images.map((i, index) => (
<GridCol span={6} key={`g_i_${i}_${i.name?.slice(0, 10) || 'none'}`}>
<GridCol span={6} key={`g_i_${i}_${i.name?.slice(0, 10) || 'none'}_${index}`}>
<GalleryGridImage {...i} showTooltipOnHover={props.showTooltipOnHover} />
</GridCol>
))}
Expand Down

0 comments on commit 0dce079

Please sign in to comment.