From 9b75524d43c99a49dfe51c2b24fac6258420cddd Mon Sep 17 00:00:00 2001 From: ajaythapliyal Date: Sat, 18 Mar 2023 18:38:10 +0530 Subject: [PATCH] memoize the training model modal --- frontend/src/upload/Upload.tsx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/frontend/src/upload/Upload.tsx b/frontend/src/upload/Upload.tsx index 1343929c..a7393f22 100644 --- a/frontend/src/upload/Upload.tsx +++ b/frontend/src/upload/Upload.tsx @@ -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 = ; } else if (progress?.type === 'TRAINIING') { - view = ; + const MemoTrainingProgress = React.memo(TrainingProgress); + view = ; } else { view = ( <>