Fixed minor bugs everywhere

This commit is contained in:
Vladyslav Matsiiako
2023-02-26 17:51:26 -08:00
parent 0f143adbde
commit d9c055872d
14 changed files with 51 additions and 21 deletions
@@ -71,6 +71,19 @@ const DropZone = ({
}));
break;
}
case 'json': {
const keyPairs = JSON.parse(String(file));
secrets = Object.keys(keyPairs).map((key, index) => ({
id: guidGenerator(),
pos: numCurrentRows + index,
key,
value: keyPairs[key as keyof typeof keyPairs],
comment: '',
type: 'shared',
tags: []
}));
break;
}
case 'yml': {
const parsedFile = parseDocument(file.toString());
const keyPairs = parsedFile.contents!.toJSON();