diff --git a/src/navbar/timelord.tsx b/src/navbar/timelord.tsx index 8eb2ea4..8cbc1d7 100644 --- a/src/navbar/timelord.tsx +++ b/src/navbar/timelord.tsx @@ -36,15 +36,20 @@ export function Timelord() { } const broadcastState = useSelector((state: RootState) => state.broadcast); - const [source, setSource] = useState({ id: 0, name: "Unknown" }); + const [source, setSource] = useState({ id: -1, name: "Loading" }); const [isSilence, setSilence] = useState(false); - useInterval(async () => { - setSource(await getSource()); - }, 3000); + useInterval( + async () => { + setSource(await getSource()); + }, + broadcastState.stage === "REGISTERED" ? 3000 : 10000 + ); useInterval(async () => { - setSilence(await getSilence()); + broadcastState.stage === "REGISTERED" + ? setSilence(await getSilence()) + : setSilence(false); }, 3000); return ( @@ -71,10 +76,12 @@ export function Timelord() { ) : isSilence ? ( SILENCE DETECTED ) : ( - - {source.name} -  is On Air - + source.id > -1 && ( + + {source.name} +  is On Air + + ) )} );