-
Notifications
You must be signed in to change notification settings - Fork 140
Open
Labels
enhancementNew feature or requestNew feature or requesthelp wantedExtra attention is neededExtra attention is needed
Description
hedgehog-lab/packages/hedgehog-lab/src/HedgehogLab.tsx
Lines 40 to 64 in 432a210
const getLocalCodeList = () => { | |
try { | |
const result = localStorage.getItem('localNameList'); | |
if (result) { | |
const list = JSON.parse(result) as string[]; | |
const newLocalList = []; | |
for (let i = 0; i < list.length; i++) { | |
if (list[i] !== 'localNameList') { | |
newLocalList.push({ | |
description: list[i], | |
source: localStorage.getItem(list[i]) as string | |
}); | |
} | |
} | |
//console.log(newLocalList); | |
setLocalList(newLocalList); | |
} else { | |
localStorage.setItem('localNameList', JSON.stringify(['localNameList'])); | |
} | |
} catch (err) { | |
throw new Error("Error while getting local code list: " + err); | |
} | |
}; |
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or requesthelp wantedExtra attention is neededExtra attention is needed