@@ -91,6 +91,7 @@ const Migration = () => {
9191
9292
9393 const saveRef = useRef < ContentTypeSaveHandles > ( null ) ;
94+ const newMigrationDataRef = useRef ( newMigrationData ) ;
9495
9596 useEffect ( ( ) => {
9697 fetchData ( ) ;
@@ -99,14 +100,14 @@ const Migration = () => {
99100 /**
100101 * Dispatches the isprojectMapped key to redux
101102 */
102- useEffect ( ( ) => {
103- dispatch ( updateNewMigrationData ( {
104- ...newMigrationData ,
105- isprojectMapped : isProjectMapper
103+ // useEffect(()=> {
104+ // dispatch(updateNewMigrationData({
105+ // ...newMigrationDataRef?.current ,
106+ // isprojectMapped: isProjectMapper
106107
107- } ) ) ;
108+ // }));
108109
109- } , [ isProjectMapper ] ) ;
110+ // },[isProjectMapper]);
110111
111112
112113 useBlockNavigation ( isModalOpen ) ;
@@ -238,11 +239,11 @@ const Migration = () => {
238239 const projectMapper = {
239240 ...newMigrationData ,
240241 legacy_cms : {
241- ...newMigrationData ?. legacy_cms ,
242+ ...newMigrationDataRef ?. current ?. legacy_cms ,
242243 selectedCms : selectedCmsData ,
243- selectedFileFormat : selectedFileFormatData ,
244244 affix : projectData ?. legacy_cms ?. affix ,
245245 uploadedFile : {
246+ ...newMigrationDataRef ?. current ?. legacy_cms ,
246247 file_details : {
247248 localPath : projectData ?. legacy_cms ?. file_path ,
248249 awsData : {
@@ -288,6 +289,7 @@ const Migration = () => {
288289 } ,
289290 stackDetails : projectData ?. stackDetails ,
290291 testStacks : projectData ?. test_stacks ,
292+ isprojectMapped : false ,
291293 project_current_step : projectData ?. current_step ,
292294 } ;
293295
0 commit comments