diff --git a/src/App.tsx b/src/App.tsx index d1944ec..ee182cb 100644 --- a/src/App.tsx +++ b/src/App.tsx @@ -52,11 +52,12 @@ function navidromeURL(path: string, params: Record): string { }).toString(); } +const WELCOME_TEXT = "Scan an album to begin."; function App() { const [album, setAlbum] = useState(null); const [buffer, setBuffer] = useState([]); const [nowPlaying, play] = useState(0); - const [displayText, setDisplayText] = useState("Scan an album to begin."); + const [displayText, setDisplayText] = useState(WELCOME_TEXT); const [paused, setPaused] = useState(true); const [currentTime, setCurrentTime] = useState(0); const [duration, setDuration] = useState(0); @@ -146,7 +147,7 @@ function App() { }); if (searchResponse.count === 0) { setDisplayText("No album found for barcode: " + barcode); - setTimeout(() => setDisplayText("Scan an album to begin."), 3000); + setTimeout(() => setDisplayText(WELCOME_TEXT), 3000); return; } mbRelease = searchResponse.releases[0];