diff --git a/src/components/sound/favorite/favorite.tsx b/src/components/sound/favorite/favorite.tsx index 64f122b..80c364f 100644 --- a/src/components/sound/favorite/favorite.tsx +++ b/src/components/sound/favorite/favorite.tsx @@ -7,6 +7,8 @@ import { fade } from '@/lib/motion'; import styles from './favorite.module.css'; +import { useKeyboardButton } from '@/hooks/useKeyboardButton'; + interface FavoriteProps { id: string; } @@ -17,11 +19,16 @@ export function Favorite({ id }: FavoriteProps) { const variants = fade(); + const handleKeyDown = useKeyboardButton(() => { + toggleFavorite(id); + }); + return (