new status endpoint
This commit is contained in:
parent
5c34b5dd0b
commit
62a70cf16c
1 changed files with 3 additions and 2 deletions
|
@ -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) {
|
||||
|
|
Loading…
Reference in a new issue