diff --git a/frontend/src/components/LoadingBackdrop.tsx b/frontend/src/components/LoadingBackdrop.tsx index 3f2b31c..4274862 100644 --- a/frontend/src/components/LoadingBackdrop.tsx +++ b/frontend/src/components/LoadingBackdrop.tsx @@ -1,10 +1,10 @@ import { Backdrop, CircularProgress } from '@mui/material' -import { useRecoilValue } from 'recoil' -import { loadingAtom } from '../atoms/ui' -const LoadingBackdrop: React.FC = () => { - const isLoading = useRecoilValue(loadingAtom) +type Props = { + isLoading: boolean +} +const LoadingBackdrop: React.FC = ({ isLoading }) => { return ( theme.zIndex.drawer + 1 }} diff --git a/frontend/src/views/Home.tsx b/frontend/src/views/Home.tsx index c8b6a81..9b4e7db 100644 --- a/frontend/src/views/Home.tsx +++ b/frontend/src/views/Home.tsx @@ -1,15 +1,19 @@ import { Container } from '@mui/material' +import { useRecoilValue } from 'recoil' +import { loadingAtom } from '../atoms/ui' import Downloads from '../components/Downloads' import HomeActions from '../components/HomeActions' import LoadingBackdrop from '../components/LoadingBackdrop' import Splash from '../components/Splash' export default function Home() { + const isLoading = useRecoilValue(loadingAtom) + return ( - + diff --git a/frontend/src/views/Livestream.tsx b/frontend/src/views/Livestream.tsx index 4917d70..97ad816 100644 --- a/frontend/src/views/Livestream.tsx +++ b/frontend/src/views/Livestream.tsx @@ -11,6 +11,7 @@ import { interval } from 'rxjs' import LivestreamDialog from '../components/livestream/LivestreamDialog' import LivestreamSpeedDial from '../components/livestream/LivestreamSpeedDial' import NoLivestreams from '../components/livestream/NoLivestreams' +import LoadingBackdrop from '../components/LoadingBackdrop' import { useSubscription } from '../hooks/observable' import { useRPC } from '../hooks/useRPC' import { LiveStreamProgress, LiveStreamStatus } from '../types' @@ -65,6 +66,8 @@ const LiveStreamMonitorView: React.FC = () => { return ( <> + + setOpenDialog(s => !s)} onStopAll={stopAll} /> setOpenDialog(s => !s)} />