[yagin]fix hot issue and warning

This commit is contained in:
yagin 2024-12-04 13:27:39 +07:00
parent a6f6eb5a34
commit c7ca48bbd8
4 changed files with 4 additions and 5 deletions

View File

@ -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';

View File

@ -4,7 +4,6 @@ export function GlobalSpin() {
return (
<Spin
size='large'
tip='Loading ...'
style={{
position: 'fixed',
top: '50%',

View File

@ -105,7 +105,7 @@ export const fetchRequest = async (id: string) => {
});
return await (
await response.json()
).subscription_requests[0];
).subscription_requests?.[0] || null;
};
export const addRecentRequest = (

View File

@ -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;
@ -588,7 +588,7 @@ const ReviewPage = () => {
<div
style={{
flexGrow: 1,
overflow: 'auto',
overflowY: 'auto',
display: 'flex',
justifyContent: 'center',
alignItems: 'center',