new currently playing music card

This commit is contained in:
alex 3
2023-12-19 17:34:35 -05:00
parent 7468125ad3
commit 30173a5bbd
8 changed files with 175 additions and 3 deletions
+30
View File
@@ -0,0 +1,30 @@
import Image from "next/image";
import Link from "next/link";
import { api } from "@/utils/api";
export default function MusicCard() {
const musicFetch = api.misc.song.useQuery()
if (musicFetch.data) {
return (
<Link href="https://last.fm/user/lulawex" target="_blank">
<div className="bg-white max-w-xs text-black rounded-sm leading-tight">
<div className="flex items-start p-2">
<div className="flex-none">
<Image
src={musicFetch.data.track.image[3]?.["#text"] ?? ""}
alt="Cover Art"
width="50"
height="50"
/>
</div>
<div className="flex flex-col ml-2 pt-1.5">
<h1>{musicFetch.data.track.name}</h1>
<p>{musicFetch.data.track.artist["#text"]}</p>
</div>
</div>
</div>
</Link>
)
}
}
+1 -1
View File
@@ -11,7 +11,7 @@ export default function Footer() {
</Link>
</p>
<p className="text-center">
All music, game, TV and movie covers are owned by their respective authors.
All music, game, TV and movie covers are owned by their respective authors.<br/>Currently playing info provided by Last.fm
</p>
<p className="text-center">
&copy; Alex Frantz, 2023