mirror of
https://github.com/status-im/spiff-arena.git
synced 2025-02-27 17:00:32 +00:00
avoid endless redirects on error on authentication list page w/ burnettk
This commit is contained in:
parent
52b496d105
commit
30166e38f4
@ -1,13 +1,11 @@
|
|||||||
import { useEffect, useState } from 'react';
|
import { useEffect, useState } from 'react';
|
||||||
// @ts-ignore
|
// @ts-ignore
|
||||||
import { Table } from '@carbon/react';
|
import { Table } from '@carbon/react';
|
||||||
import useAPIError from '../hooks/UseApiError';
|
|
||||||
import { AuthenticationItem } from '../interfaces';
|
import { AuthenticationItem } from '../interfaces';
|
||||||
import HttpService from '../services/HttpService';
|
import HttpService from '../services/HttpService';
|
||||||
import UserService from '../services/UserService';
|
import UserService from '../services/UserService';
|
||||||
|
|
||||||
export default function AuthenticationList() {
|
export default function AuthenticationList() {
|
||||||
const { addError } = useAPIError();
|
|
||||||
const [authenticationList, setAuthenticationList] = useState<
|
const [authenticationList, setAuthenticationList] = useState<
|
||||||
AuthenticationItem[] | null
|
AuthenticationItem[] | null
|
||||||
>(null);
|
>(null);
|
||||||
@ -25,9 +23,8 @@ export default function AuthenticationList() {
|
|||||||
HttpService.makeCallToBackend({
|
HttpService.makeCallToBackend({
|
||||||
path: `/authentications`,
|
path: `/authentications`,
|
||||||
successCallback: processResult,
|
successCallback: processResult,
|
||||||
failureCallback: addError,
|
|
||||||
});
|
});
|
||||||
}, [addError]);
|
}, []);
|
||||||
|
|
||||||
const buildTable = () => {
|
const buildTable = () => {
|
||||||
if (authenticationList) {
|
if (authenticationList) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user