import { useLanyard } from "use-lanyard";
import constants from "@/lib/constants";
import yard from "@/styles/Lanyard.module.sass"

const Lanyard = () => {
    const lanyard = useLanyard(constants.ids.discord as `${bigint}`).data
    if (!lanyard?.listening_to_spotify) return (<></>);
    return (
        <div id={yard.lanyard}>
            <img src={lanyard?.spotify?.album_art_url as string} alt="" />
            <span> {lanyard?.spotify?.song} by {lanyard?.spotify?.artist.split(';')[0]} </span>
        </div>

    );
};

export default Lanyard; 