new status endpoint

This commit is contained in:
Alex Grintsvayg 2020-04-22 19:54:27 -04:00 committed by Sean Yesmunt
parent 5c34b5dd0b
commit 62a70cf16c

View file

@ -1,5 +1,6 @@
import { LBRY_TV_API } from 'config';
import { SDK_API_PATH } from 'ui';
import { useEffect } from 'react';
import fetchWithTimeout from 'util/fetch';
const STATUS_TIMEOUT_LIMIT = 10000;
@ -10,7 +11,7 @@ export const STATUS_DOWN = 'down';
export function useDegradedPerformance(onDegradedPerformanceCallback) {
useEffect(() => {
fetchWithTimeout(STATUS_TIMEOUT_LIMIT, fetch(`${LBRY_TV_API}/internal/status`))
fetchWithTimeout(STATUS_TIMEOUT_LIMIT, fetch(`${SDK_API_PATH}/status`))
.then(response => response.json())
.then(status => {
if (status.general_state !== STATUS_OK) {