Skip to content

Commit

Permalink
Small refactor to the risk table
Browse files Browse the repository at this point in the history
  • Loading branch information
erikao1998 committed Jun 27, 2024
1 parent b5579c1 commit ac3077b
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 27 deletions.
24 changes: 0 additions & 24 deletions src/client/components/ResultPage/CountryRisks.tsx

This file was deleted.

13 changes: 10 additions & 3 deletions src/client/components/ResultPage/RiskTable.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,7 @@ import getCountryRiskTexts from '../../util/getCountryRiskTexts'
import RiskElement from './RiskElement'

import styles from '../../styles'
import { CountryData, RiskData } from '../../types'
import CountryRisks from './CountryRisks'
import { CountryData, Risk, RiskData } from '../../types'
import { globalNorthCountries } from '../../util/countryLists'
import useCountries from '../../hooks/useCountries'
import useResults from '../../hooks/useResults'
Expand Down Expand Up @@ -117,7 +116,15 @@ const RiskTable = ({
level={countryRisk.level}
infoText={countryInfoText}
/>
<CountryRisks countryRisks={countryRisksWithTexts} />
{countryRisksWithTexts.map((risk: Risk) => (
<RiskElement
key={risk.id}
level={risk.level}
title={risk.title}
infoText={risk.infoText}
style={{ paddingLeft: '30px' }}
/>
))}
</>
)}
{otherRisksWithTexts?.map(
Expand Down

0 comments on commit ac3077b

Please sign in to comment.