import React, { MouseEventHandler, useState } from "react"; type CityProps = { handleClick: MouseEventHandler; }; export default function Citylist({ handleClick }: CityProps) { const [active, setActive] = useState(0); const onactive = "text-start px-5 py-2 underline whitespace-nowrap"; const offactive = "text-start px-5 py-2 whitespace-nowrap"; const clickActive = (a: number) => { setActive(a); }; return (
도시
clickActive(1)}>
clickActive(2)}>
clickActive(3)}>
clickActive(4)}>
clickActive(5)}>
clickActive(6)}>
clickActive(7)}>
clickActive(8)}>
clickActive(9)}>
clickActive(10)}>
// Citylist Page ); }