@@ -2,7 +2,7 @@ import { useState, useEffect } from 'react';
22import { FaChevronUp , FaChevronDown } from 'react-icons/fa' ;
33import './ManageContent.css' ;
44import { fetchAllTechniques , fetchTechnique , dataArray , getUniqueTechniques } from '../../utils/dataMap' ;
5- import { transformData , transformKeyValue , transformReference , formatDetails , formatFields , formatReferences , handleNewTactic , addTechniqueIfNotExists } from './ManageContentUtils' ;
5+ import { transformData , transformKeyValue , transformReference , formatDetails , formatFields , formatReferences , handleNewTactic , addTechniqueIfNotExists , consolidateData } from './ManageContentUtils' ;
66import { RiAddCircleLine , RiCheckboxFill , RiDeleteBinLine } from 'react-icons/ri' ;
77import { Alert } from '../Alert/Alert'
88
@@ -351,7 +351,7 @@ const ManageContent = (props) => {
351351 handleNewTactic ( techniqueName , tactics )
352352 let inputJSON = localStorage . getItem ( 'technique_table' ) ? JSON . parse ( localStorage . getItem ( 'technique_table' ) ) : [ ] ;
353353 addedTechnique = addTechniqueIfNotExists ( inputJSON , tactics , techniqueName )
354- localStorage . setItem ( 'technique_table' , JSON . stringify ( addedTechnique ) ) ;
354+ localStorage . setItem ( 'technique_table' , JSON . stringify ( consolidateData ( addedTechnique ) ) ) ;
355355 }
356356
357357 // Now, update the localStorage based on techniqueName
0 commit comments