memoize the training model modal

This commit is contained in:
ajaythapliyal 2023-03-18 18:38:10 +05:30
parent d98c876f82
commit 9b75524d43

View File

@ -1,3 +1,4 @@
import React from 'react';
import { useCallback, useEffect, useState } from 'react';
import { useDropzone } from 'react-dropzone';
import { useDispatch } from 'react-redux';
@ -128,7 +129,8 @@ export default function Upload({
if (progress?.type === 'UPLOAD') {
view = <UploadProgress></UploadProgress>;
} else if (progress?.type === 'TRAINIING') {
view = <TrainingProgress></TrainingProgress>;
const MemoTrainingProgress = React.memo(TrainingProgress);
view = <MemoTrainingProgress></MemoTrainingProgress>;
} else {
view = (
<>