From 3418aa5ab1745356139ad62692749e5e383a1dd2 Mon Sep 17 00:00:00 2001 From: Tobias Date: Sat, 2 Aug 2025 13:16:33 +0200 Subject: [PATCH] . --- frontend/src/components/AudioPlayer.jsx | 5 +++++ frontend/src/screens/StationPage.jsx | 7 ++++--- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/frontend/src/components/AudioPlayer.jsx b/frontend/src/components/AudioPlayer.jsx index e8fea80..2c3eea2 100644 --- a/frontend/src/components/AudioPlayer.jsx +++ b/frontend/src/components/AudioPlayer.jsx @@ -4,6 +4,11 @@ const SingleAudioPlayer = ({ src }) => { const audioRef = useRef(null); const [isPlaying, setIsPlaying] = useState(false); + // Early return if no src provided + if (!src) { + return
No audio file available
; + } + const togglePlay = () => { const audio = audioRef.current; if (!audio) return; diff --git a/frontend/src/screens/StationPage.jsx b/frontend/src/screens/StationPage.jsx index 577ae0a..bb4acb1 100644 --- a/frontend/src/screens/StationPage.jsx +++ b/frontend/src/screens/StationPage.jsx @@ -1,4 +1,3 @@ -import React, { useState } from "react"; import { useParams } from "react-router-dom"; import React, { useState, useEffect } from "react"; import { addClientToStation } from "../utils/AddClientToStation"; @@ -63,7 +62,7 @@ function StationPage() {
-

Join Station {stationId}

+

Join Station {stationID}

Enter your details to access this collaborative music experience

@@ -144,7 +143,9 @@ function StationPage() {

Serena Station

Collaborative Music Experience

- + {recommendedSongs.length > 0 && ( + + )}