mirror of
https://github.com/arc53/DocsGPT
synced 2024-11-03 23:15:37 +00:00
memoize the training model modal
This commit is contained in:
parent
d98c876f82
commit
9b75524d43
@ -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 = (
|
||||
<>
|
||||
|
Loading…
Reference in New Issue
Block a user