mirror of
https://github.com/awatertrevi/infisical.git
synced 2026-10-11 05:28:51 +00:00
refactor: set data as a map instead of list
This commit is contained in:
@@ -68,13 +68,14 @@ const getSecretsForProject = async ({
|
||||
setFileState(tempFileState);
|
||||
|
||||
setData(
|
||||
tempFileState.map((line, index) => [
|
||||
guidGenerator(),
|
||||
index,
|
||||
line["key"],
|
||||
line["value"],
|
||||
line["type"],
|
||||
])
|
||||
tempFileState.map((line, index) => {
|
||||
return {
|
||||
id: guidGenerator(),
|
||||
key: line["key"],
|
||||
value: line["value"],
|
||||
type: line["type"]
|
||||
}
|
||||
})
|
||||
// .sort((a, b) =>
|
||||
// sortMethod == "alphabetical"
|
||||
// ? a[2].localeCompare(b[2])
|
||||
|
||||
Reference in New Issue
Block a user