diff --git a/src/components/card/popularCard/PopularCard.tsx b/src/components/card/popularCard/PopularCard.tsx index d08af57..3ec2e77 100644 --- a/src/components/card/popularCard/PopularCard.tsx +++ b/src/components/card/popularCard/PopularCard.tsx @@ -1,6 +1,8 @@ import Icon from '@assets/svgs'; +import { useState } from 'react'; import * as styles from './popularCard.css'; + interface PopularCardProps { ranking: number; templeName: string; @@ -18,10 +20,26 @@ const PopularCard = ({ templeImg, tag, onClick, - isLiked, + isLiked = false, }: PopularCardProps) => { + const [liked, setLiked] = useState(isLiked); + + const handleLikeClick = (e: React.MouseEvent) => { + e.stopPropagation(); + setLiked((prev) => !prev); + }; + return ( - - + ); };