diff --git a/src/components/BlogCard.tsx b/src/components/BlogCard.tsx
deleted file mode 100644
index b9d5fbb..0000000
--- a/src/components/BlogCard.tsx
+++ /dev/null
@@ -1,26 +0,0 @@
-import Image from 'next/image'
-import Link from 'next/link';
-
-type BlogCardProps = {
- image: string,
- name: string,
- tagline: string,
- id: number
-}
-export default function BlogCard(props: BlogCardProps) {
- return (
-
-
-
-
-
-
-
-
{props.name}
-
{props.tagline}
-
-
-
-
- )
-}
\ No newline at end of file
diff --git a/src/components/Dropdown.tsx b/src/components/Dropdown.tsx
deleted file mode 100644
index a4db05d..0000000
--- a/src/components/Dropdown.tsx
+++ /dev/null
@@ -1,22 +0,0 @@
-import React, {useState} from 'react';
-
-type DropdownProps = {
- name: string,
- content: React.JSX.Element[]
-}
-
-export default function Dropdown(props: DropdownProps) {
- const [active, setActive] = useState(false)
- return (
- <>
-
active ? setActive(false) : setActive(true)}>
- {props.name}
-
-
-
-
- {props.content}
-
- >
- )
-}
\ No newline at end of file
diff --git a/src/components/MusicCard.tsx b/src/components/MusicCard.tsx
index 0e7ec33..cae1d1b 100644
--- a/src/components/MusicCard.tsx
+++ b/src/components/MusicCard.tsx
@@ -3,28 +3,47 @@ import Link from "next/link";
import { api } from "@/utils/api";
export default function MusicCard() {
- const musicFetch = api.misc.song.useQuery()
+ const {data: musicData, fetchStatus} = api.misc.song.useQuery()
- if (musicFetch.data) {
- return (
-
-
-
-
-
-
-
-
{musicFetch.data.track.name}
-
{musicFetch.data.track.artist["#text"]}
-
-
-
+ return (
+
+
Listening To
+
+ {/* link to lastfm */}
+
+ Powered by Last.fm
- )
- }
+
+ {
+ fetchStatus !== "fetching" ?
+
+ {
+ musicData?.track.map((v,k) => {
+ return
+
+
+
+
{v.name}
+
+
{v.artist["#text"]}
+
+
+ })
+ }
+
+ :
+
Hold tight, fetching..
+ }
+
+ )
}
\ No newline at end of file
diff --git a/src/pages/index.tsx b/src/pages/index.tsx
index 6ae54d3..a6f5aa9 100644
--- a/src/pages/index.tsx
+++ b/src/pages/index.tsx
@@ -1,4 +1,5 @@
import RootLayout from "@/components/RootLayout";
+import MusicCard from "@/components/MusicCard";
import Link from 'next/link';
import { Cli } from "grommet-icons";
@@ -51,6 +52,10 @@ export default function Home() {
+
+