diff --git a/cope2n-fe/src/components/left-menu/index.tsx b/cope2n-fe/src/components/left-menu/index.tsx index d0390dc..3bee952 100644 --- a/cope2n-fe/src/components/left-menu/index.tsx +++ b/cope2n-fe/src/components/left-menu/index.tsx @@ -1,4 +1,4 @@ -import { AppstoreOutlined, BarChartOutlined, RotateRightOutlined, FileSearchOutlined } from '@ant-design/icons'; +import { AppstoreOutlined, BarChartOutlined, RotateRightOutlined } from '@ant-design/icons'; import { t } from '@lingui/macro'; import { Menu, MenuProps } from 'antd'; import React from 'react'; diff --git a/cope2n-fe/src/components/spin/index.tsx b/cope2n-fe/src/components/spin/index.tsx index 3c1b782..a11eba0 100644 --- a/cope2n-fe/src/components/spin/index.tsx +++ b/cope2n-fe/src/components/spin/index.tsx @@ -4,7 +4,6 @@ export function GlobalSpin() { return ( { }); return await ( await response.json() - ).subscription_requests[0]; + ).subscription_requests?.[0] || null; }; export const addRecentRequest = ( diff --git a/cope2n-fe/src/pages/reviews2/index.tsx b/cope2n-fe/src/pages/reviews2/index.tsx index 5e2ecce..a6d73ab 100644 --- a/cope2n-fe/src/pages/reviews2/index.tsx +++ b/cope2n-fe/src/pages/reviews2/index.tsx @@ -172,7 +172,7 @@ const ReviewPage = () => { const setAndLoadSelectedFile = async (requestData, index) => { setSelectedFileId(index); - if (!requestData['Files'][index]) { + if (!requestData?.['Files'][index]) { setSelectedFileData('FAILED_TO_LOAD_FILE'); setImageLoading(false); return; @@ -416,18 +416,18 @@ const ReviewPage = () => { style={ fullscreen ? { - position: 'fixed', - top: 0, - left: 0, - width: '100%', - height: '100%', - backgroundColor: '#fff', - zIndex: 1000, - } + position: 'fixed', + top: 0, + left: 0, + width: '100%', + height: '100%', + backgroundColor: '#fff', + zIndex: 1000, + } : { - height: '100%', - position: 'relative', - } + height: '100%', + position: 'relative', + } } >
{ overflow: 'auto', }} > - setImageLoading(false)} - /> + />}
) : (
{ >