From 45b958642b9a5e087246777533370c1d46de996b Mon Sep 17 00:00:00 2001 From: zadit <75159257+insvrgent@users.noreply.github.com> Date: Thu, 17 Oct 2024 03:54:32 +0700 Subject: [PATCH] ok --- src/components/Header.js | 3 ++- src/components/Item.module.css | 3 +++ src/components/ItemLister.module.css | 2 -- src/components/MusicPlayer.js | 19 ++++++++++--------- src/pages/CafePage.js | 3 ++- 5 files changed, 17 insertions(+), 13 deletions(-) diff --git a/src/components/Header.js b/src/components/Header.js index f62b26d..0468191 100644 --- a/src/components/Header.js +++ b/src/components/Header.js @@ -215,6 +215,7 @@ const Header = ({ HeaderText, shopId, shopName, + shopImage, shopOwnerId, shopClerks, tableCode, @@ -307,7 +308,7 @@ const Header = ({
{ @@ -89,8 +90,10 @@ export function MusicPlayer({ socket, shopId, user, isSpotifyNeedLogin }) { 255; if (luminance > 0.5) { setSubtitleColor("black"); + setSubtitleBG("white"); } else { setSubtitleColor("white"); + setSubtitleBG("black"); } setBackgroundImage(imageUrl); } catch (error) { @@ -312,17 +315,20 @@ export function MusicPlayer({ socket, shopId, user, isSpotifyNeedLogin }) { style={{ backgroundImage: `url(${backgroundImage})` }} > {currentLines.past.map((line, index) => ( -
+

{line.words}

))} {currentLines.present.map((line, index) => ( -
+

{line.words}

))} {currentLines.future.map((line, index) => ( -
+

{line.words}

))} @@ -439,12 +445,7 @@ export function MusicPlayer({ socket, shopId, user, isSpotifyNeedLogin }) {
{expanded ? "︿" - : currentSong.item && - currentSong.item.album && - currentSong.item.album.images[0] && - currentSong.item.artists[0] - ? "expand" - : "request your song"} + : "request your song"}
} diff --git a/src/pages/CafePage.js b/src/pages/CafePage.js index 9a9cc20..c081595 100644 --- a/src/pages/CafePage.js +++ b/src/pages/CafePage.js @@ -71,7 +71,6 @@ function CafePage({ setIsStarted(true); } } - setLoading(false); }; useEffect(() => { @@ -118,6 +117,7 @@ function CafePage({ socket.on("joined-room", (response) => { const { isSpotifyNeedLogin } = response; setNeedSpotifyLogin(isSpotifyNeedLogin); + setLoading(false); }); } @@ -162,6 +162,7 @@ function CafePage({ isLogout={handleLogout} shopId={shopId} shopName={shopName} + shopImage={config.image} shopOwnerId={shopOwnerId} shopClerks={shopClerks} tableCode={table.tableCode}