From 1fa7698c1b1ca12aa57ef2fbc46720e838314add Mon Sep 17 00:00:00 2001 From: Mathias Wagner Date: Thu, 27 Feb 2025 21:43:08 +0100 Subject: [PATCH] Use static song --- client/src/pages/Home/Home.jsx | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) diff --git a/client/src/pages/Home/Home.jsx b/client/src/pages/Home/Home.jsx index 62eeb46..e732f61 100644 --- a/client/src/pages/Home/Home.jsx +++ b/client/src/pages/Home/Home.jsx @@ -4,19 +4,16 @@ import {useContext, useState, useEffect, useRef} from "react"; import { FontAwesomeIcon } from '@fortawesome/react-fontawesome'; import { faMusic } from '@fortawesome/free-solid-svg-icons'; -const songs = ["Twinkle Twinkle Little Star", "Happy Birthday", "Jingle Bells", "Mary Had a Little Lamb", "Old MacDonald Had a Farm"]; - export const Home = () => { const {setCurrentState} = useContext(StateContext); const [frequency, setFrequency] = useState(440); const [isPlaying, setIsPlaying] = useState(false); - const [currentSong, setCurrentSong] = useState(songs[Math.floor(Math.random() * songs.length)]); const [dragging, setDragging] = useState(false); const audioContextRef = useRef(null); const oscillatorRef = useRef(null); const gainNodeRef = useRef(null); const sliderRef = useRef(null); - const [messages, setMessages] = useState([]); + const [messages, setMessages] = useState([{ sender: "Marco", text: "Hallo!" },]); const [inputValue, setInputValue] = useState(""); const messageEndRef = useRef(null); @@ -98,12 +95,12 @@ export const Home = () => {
-

Play this song:

+

ToneGuessr

- Song + Song
-
{currentSong}
-
A beautiful classic song for you to play on the Otamatone.
+
Black Steam
+
von Carrot Quest GmbH
@@ -127,7 +124,7 @@ export const Home = () => { value={inputValue} onChange={(e) => setInputValue(e.target.value)} onKeyPress={(e) => e.key === 'Enter' && handleSendMessage()} - placeholder="Type your message..." + placeholder="Gib eine Nachricht ein..." />