From 6f7bae521733fc1469c9f802d5a804cc6f80c61f Mon Sep 17 00:00:00 2001 From: Marie Holen Danielson Date: Wed, 2 Sep 2026 23:32:37 +0200 Subject: [PATCH] lag statisk SongCard-komponent --- src/App.tsx | 12 ++++++++++++ src/components/SongCard.tsx | 23 +++++++++++++++++++++++ src/main.tsx | 15 +++++++++++++++ 3 files changed, 50 insertions(+) create mode 100644 src/components/SongCard.tsx diff --git a/src/App.tsx b/src/App.tsx index e69de29..13068d4 100644 --- a/src/App.tsx +++ b/src/App.tsx @@ -0,0 +1,12 @@ +import { SongCard } from "./components/SongCard"; +import { songs } from "./data/songs" + +function App() { + return ( +
+ +
+ ) +} + +export default App \ No newline at end of file diff --git a/src/components/SongCard.tsx b/src/components/SongCard.tsx new file mode 100644 index 0000000..99a0bbc --- /dev/null +++ b/src/components/SongCard.tsx @@ -0,0 +1,23 @@ +import type { Song } from '../data/songs' + +type SongCardProps = { + song: Song +} + +export function SongCard({ song }: SongCardProps) { + return ( +
+

{song.title}

+

{song.artist}

+ +
+

Teksten vises her

+
+ +
+

Bilde vises her

+
+ +
+ ) +} \ No newline at end of file diff --git a/src/main.tsx b/src/main.tsx index e69de29..ac18159 100644 --- a/src/main.tsx +++ b/src/main.tsx @@ -0,0 +1,15 @@ +import { StrictMode } from 'react' +import { createRoot } from 'react-dom/client' +import { QueryClient, QueryClientProvider } from '@tanstack/react-query' +import './index.css' +import App from './App.tsx' + +const queryClient = new QueryClient() + +createRoot(document.getElementById('root')!).render( + + + + + , +) \ No newline at end of file