Updated the StatusContext.jsx
This commit is contained in:
parent
662547d244
commit
96965bbb1d
@ -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>
|
||||||
)
|
)
|
||||||
|
Reference in New Issue
Block a user