diff --git a/src/components/carousel.tsx b/src/components/carousel.tsx index 25c8203..7ef10c2 100644 --- a/src/components/carousel.tsx +++ b/src/components/carousel.tsx @@ -28,16 +28,8 @@ export default function Carousel({ images, className }: Props) { if (!isFocused || !emblaApi) return; const handleKeyDown = (event: KeyboardEvent) => { - switch (event.key) { - case "ArrowLeft": - emblaApi.scrollPrev(); - break; - case "ArrowRight": - emblaApi.scrollNext(); - break; - default: - break; - } + if (event.key === "ArrowLeft") emblaApi.scrollPrev(); + else if (event.key === "ArrowRight") emblaApi.scrollNext(); }; window.addEventListener("keydown", handleKeyDown); @@ -48,7 +40,7 @@ export default function Carousel({ images, className }: Props) { return (
setIsFocused(true)} onMouseLeave={() => setIsFocused(false)}> -
+
{images.map((src, index) => (
diff --git a/src/components/mii-list/index.tsx b/src/components/mii-list/index.tsx index 5339fa6..82d943d 100644 --- a/src/components/mii-list/index.tsx +++ b/src/components/mii-list/index.tsx @@ -159,7 +159,7 @@ export default async function MiiList({ searchParams, userId, inLikesPage }: Pro {miis.map((mii) => (