Copying some settings values to status to avoid calling both /settings and /status.

This commit is contained in:
Roland 2022-10-16 11:53:44 -06:00
parent 78218d3559
commit dbdcc7a57c
No known key found for this signature in database
GPG key ID: 9D6DBD3ACF11AB93
10 changed files with 105 additions and 68 deletions

View file

@ -656,6 +656,19 @@ export const useStatus = () => {
return {status, fetchStatus}
}
export const useStatusInterval = () => {
const {status, fetchStatus} = useStatus();
useEffect(() => {
const interval = setInterval(() => {
fetchStatus();
}, 1000 * 3);
return () => clearInterval(interval);
}, []);
return {status, fetchStatus};
}
export const useVideoStatistics = () => {
const [statistics, setStatistics] = useState({});