style: remove border from carousel in mii list

This commit is contained in:
trafficlunar 2025-07-18 23:37:51 +01:00
parent a37759622a
commit 1a14683a10
2 changed files with 4 additions and 12 deletions

View file

@ -28,16 +28,8 @@ export default function Carousel({ images, className }: Props) {
if (!isFocused || !emblaApi) return; if (!isFocused || !emblaApi) return;
const handleKeyDown = (event: KeyboardEvent) => { const handleKeyDown = (event: KeyboardEvent) => {
switch (event.key) { if (event.key === "ArrowLeft") emblaApi.scrollPrev();
case "ArrowLeft": else if (event.key === "ArrowRight") emblaApi.scrollNext();
emblaApi.scrollPrev();
break;
case "ArrowRight":
emblaApi.scrollNext();
break;
default:
break;
}
}; };
window.addEventListener("keydown", handleKeyDown); window.addEventListener("keydown", handleKeyDown);
@ -48,7 +40,7 @@ export default function Carousel({ images, className }: Props) {
return ( return (
<div className="relative w-full h-fit" tabIndex={0} onMouseEnter={() => setIsFocused(true)} onMouseLeave={() => setIsFocused(false)}> <div className="relative w-full h-fit" tabIndex={0} onMouseEnter={() => setIsFocused(true)} onMouseLeave={() => setIsFocused(false)}>
<div className={`overflow-hidden rounded-xl bg-zinc-300 border-2 border-zinc-300 ${className ?? ""}`} ref={emblaRef}> <div className={`overflow-hidden rounded-xl bg-zinc-300 ${className ?? ""}`} ref={emblaRef}>
<div className="flex"> <div className="flex">
{images.map((src, index) => ( {images.map((src, index) => (
<div key={index} className="flex-shrink-0 w-full"> <div key={index} className="flex-shrink-0 w-full">

View file

@ -159,7 +159,7 @@ export default async function MiiList({ searchParams, userId, inLikesPage }: Pro
{miis.map((mii) => ( {miis.map((mii) => (
<div <div
key={mii.id} key={mii.id}
className="flex flex-col bg-zinc-50 rounded-3xl border-2 border-zinc-300 shadow-lg p-3 transition hover:scale-105 hover:bg-cyan-100 hover:border-cyan-600" className="flex flex-col bg-zinc-50 rounded-3xl border-2 border-zinc-300 shadow-lg p-[0.8rem] transition hover:scale-105 hover:bg-cyan-100 hover:border-cyan-600"
> >
<Carousel <Carousel
images={[ images={[