@@ -4,8 +4,6 @@ import Image from "next/image";
44import Link from "next/link" ;
55import { useEffect , useRef } from "react" ;
66
7- import styles from "./home-college-cards.module.css" ;
8-
97import { ListUniversity } from "@/types/university" ;
108
119type HomeCollegeCardsProps = {
@@ -17,7 +15,7 @@ const HomeCollegeCards = ({ colleges }: HomeCollegeCardsProps) => {
1715
1816 const handleWheel = ( e : WheelEvent ) => {
1917 if ( containerRef . current ) {
20- e . preventDefault ( ) ; // 기본 스크롤 동작 중지
18+ e . preventDefault ( ) ;
2119 containerRef . current . scrollLeft += e . deltaY ;
2220 }
2321 } ;
@@ -36,8 +34,8 @@ const HomeCollegeCards = ({ colleges }: HomeCollegeCardsProps) => {
3634 } , [ ] ) ;
3735
3836 return (
39- < div ref = { containerRef } className = { styles . container } >
40- < div className = { styles . items } >
37+ < div ref = { containerRef } className = "overflow-x-auto" >
38+ < div className = "flex gap-2" >
4139 { colleges . map ( ( college ) => (
4240 < HomeCollegeCard
4341 key = { college . id }
@@ -61,17 +59,20 @@ type HomeCollegeCardProps = {
6159
6260const HomeCollegeCard = ( { id, imageUrl, name } : HomeCollegeCardProps ) => (
6361 < Link href = { `/university/${ id } ` } >
64- < div className = { styles . card } >
65- < div className = { styles [ "image-wrapper" ] } >
62+ < div className = "relative w-[153px]" >
63+ < div className = "relative w-[153px]" >
64+ < div className = "absolute inset-0 h-[120px] rounded-lg bg-gradient-to-b from-transparent via-black/35 to-black/70" />
6665 < Image
67- className = "h-[120px]"
66+ className = "h-[120px] rounded-lg object-cover "
6867 src = { `${ process . env . NEXT_PUBLIC_IMAGE_URL } /${ imageUrl } ` }
6968 width = { 153 }
7069 height = { 120 }
7170 alt = { name || "대학 없음" }
7271 />
7372 </ div >
74- < div className = { styles . name } > { name } </ div >
73+ < div className = "absolute bottom-[9px] left-[10px] z-10 text-sm font-semibold leading-[160%] tracking-[0.15px] text-white" >
74+ { name }
75+ </ div >
7576 </ div >
7677 </ Link >
7778) ;
0 commit comments