Updated the StatusContext.jsx

This commit is contained in:
2023-08-05 21:52:56 +02:00
parent 662547d244
commit 96965bbb1d

View File

@@ -13,7 +13,7 @@ export const StatusProvider = (props) => {
} else { } else {
setBackendAvailable(true); setBackendAvailable(true);
} }
}); }).catch(() => setBackendAvailable(false));
useEffect(() => { useEffect(() => {
updateStatus(); updateStatus();
@@ -22,7 +22,7 @@ export const StatusProvider = (props) => {
}, []); }, []);
return ( return (
<StatusContext.Provider value={backendAvailable}> <StatusContext.Provider value={{backendAvailable, updateStatus}}>
{props.children} {props.children}
</StatusContext.Provider> </StatusContext.Provider>
) )