import { useEffect, useState } from 'react'

const Like = ({ storageKey, likes }) => {
    const [hasLiked, setHasLiked] = useState(false)

    useEffect(() => {
        setHasLiked(window.localStorage.getItem(storageKey) === 'true')
    }, [storageKey])
})