Skip to content

Commit

Permalink
removed hard coded order of pillars.
Browse files Browse the repository at this point in the history
  • Loading branch information
ATNoblis committed Sep 19, 2024
1 parent 019e1c4 commit 38708f5
Showing 1 changed file with 2 additions and 9 deletions.
11 changes: 2 additions & 9 deletions src/views/QuestionnareModal/QuestionnareModal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -50,15 +50,6 @@ const CssTextField = styled(TextField)({
},
})

const pillarOrder: Record<string, number> = {
Identity: 1,
Devices: 2,
Networks: 3,
Applications: 4,
Data: 5,
CrossCutting: 6,
}

type Category = {
name: string
steps: FismaQuestion[]
Expand Down Expand Up @@ -216,9 +207,11 @@ export default function QuestionnareModal({
.then((response) => {
const data = response.data.data
const organizedData: Record<string, FismaQuestion[]> = {}
const pillarOrder: Record<string, number> = {}
data.forEach((question: FismaQuestion) => {
if (!organizedData[question.pillar.pillar]) {
organizedData[question.pillar.pillar] = []
pillarOrder[question.pillar.pillar] = question.pillar.order
}
organizedData[question.pillar.pillar].push(question)
})
Expand Down

0 comments on commit 38708f5

Please sign in to comment.