This commit is contained in:
Lio 2024-10-09 10:46:38 +00:00
parent 245b792e0e
commit b7ed1e1b0b

View file

@ -1,17 +1,17 @@
import { useLanyard } from "use-lanyard"; // import { useLanyard } from "use-lanyard";
import constants from "@/lib/constants"; // import constants from "@/lib/constants";
import yard from "@/styles/Lanyard.module.sass" // import yard from "@/styles/Lanyard.module.sass"
const Lanyard = () => { // const Lanyard = () => {
const lanyard = useLanyard(constants.ids.discord as `${bigint}`).data // const lanyard = useLanyard(constants.ids.discord as `${bigint}`).data
if (!lanyard?.listening_to_spotify) return (<></>); // if (!lanyard?.listening_to_spotify) return (<></>);
return ( // return (
<div id={yard.lanyard}> // <div id={yard.lanyard}>
<img src={lanyard?.spotify?.album_art_url as string} alt="" /> // <img src={lanyard?.spotify?.album_art_url as string} alt="" />
<span> {lanyard?.spotify?.song} by {lanyard?.spotify?.artist.split(';').length < 3 ? (lanyard?.spotify?.artist.split(';') as string[]).join(" &") : (lanyard?.spotify?.artist.split(';')[0])} </span> // <span> {lanyard?.spotify?.song} by {lanyard?.spotify?.artist.split(';').length < 3 ? (lanyard?.spotify?.artist.split(';') as string[]).join(" &") : (lanyard?.spotify?.artist.split(';')[0])} </span>
</div> // </div>
); // );
}; // };
export default Lanyard; // export default Lanyard;