Skip to content

Commit 49f13cf

Browse files
fix(Tablet): add error check
1 parent 9da6a9d commit 49f13cf

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

src/containers/Tablet/Tablet.tsx

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ import {useAutofetcher, useTypedSelector} from '../../utils/hooks';
1010
import '../../services/api';
1111

1212
import EntityStatus from '../../components/EntityStatus/EntityStatus';
13+
import {ResponseError} from '../../components/Errors/ResponseError';
1314
import {Tag} from '../../components/Tag';
1415
import {Icon} from '../../components/Icon';
1516
import {EmptyState} from '../../components/EmptyState';
@@ -39,6 +40,7 @@ export const Tablet = () => {
3940
id: tabletId,
4041
history = [],
4142
tenantPath,
43+
error,
4244
} = useTypedSelector((state) => state.tablet);
4345

4446
useEffect(() => {
@@ -68,6 +70,10 @@ export const Tablet = () => {
6870
return <Loader size="l" />;
6971
}
7072

73+
if (error) {
74+
return <ResponseError error={error} />;
75+
}
76+
7177
if (!tablet || !Object.keys(tablet).length) {
7278
return (
7379
<div className={b('placeholder')}>

0 commit comments

Comments
 (0)