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 && ( + + )}