diff --git a/src/client/components/ResultPage/CountryResults.tsx b/src/client/components/ResultPage/CountryResults.tsx
index b9a3adc..e40f5ce 100644
--- a/src/client/components/ResultPage/CountryResults.tsx
+++ b/src/client/components/ResultPage/CountryResults.tsx
@@ -27,6 +27,8 @@ const CountryResults = ({
(r) => r.optionLabel === `safetyLevel${country.safetyLevel}`
)?.isSelected[language as keyof Locales]
+ const sanctionsRisk = country.sanctions ? 2 : 1
+
return (
<>
+
>
)
}
diff --git a/src/client/components/ResultPage/RiskElement.tsx b/src/client/components/ResultPage/RiskElement.tsx
index bc8bd9a..880220c 100644
--- a/src/client/components/ResultPage/RiskElement.tsx
+++ b/src/client/components/ResultPage/RiskElement.tsx
@@ -8,7 +8,7 @@ const { resultStyles } = styles
export interface RiskElementProps {
// eslint-disable-next-line react/require-default-props
- infoText?: string
+ infoText?: string | null
resultText: string
risk: number
}
diff --git a/src/client/locales/en.json b/src/client/locales/en.json
index c3c6917..7cc9327 100644
--- a/src/client/locales/en.json
+++ b/src/client/locales/en.json
@@ -30,7 +30,8 @@
"funderRiskLevel": "Risk level of the project funder",
"fundingRiskLevel": "Risk level of the external funding",
"totalRiskLevel": "Total risk level of the project",
- "noRisk": "No identifiable risk"
+ "noRisk": "No identifiable risk",
+ "sanctionsRisk": "*Read more information about the sanctions at [sanctionsmap.eu](https://sanctionsmap.eu/#/main)*"
},
"results": {
"title": "Summary of Your Choices",
diff --git a/src/client/locales/fi.json b/src/client/locales/fi.json
index f88a747..8f0c1aa 100644
--- a/src/client/locales/fi.json
+++ b/src/client/locales/fi.json
@@ -30,7 +30,8 @@
"funderRiskLevel": "Projektin rahoittajan riskitaso",
"fundingRiskLevel": "Ulkopuolisen rahoituksen riskitaso",
"totalRiskLevel": "Yhteistyön kokonaisriskitaso",
- "noRisk": "Ei erityistä riskiä"
+ "noRisk": "Ei erityistä riskiä",
+ "sanctionsRisk": "*Lue lisää maahan kohdistuvista pakotteista [sanctionsmap.eu](https://sanctionsmap.eu/#/main)-sivulta*"
},
"results": {
"title": "Yhteenveto valinnoistasi",
diff --git a/src/client/locales/sv.json b/src/client/locales/sv.json
index a344d8b..7e4e6ca 100644
--- a/src/client/locales/sv.json
+++ b/src/client/locales/sv.json
@@ -30,7 +30,8 @@
"funderRiskLevel": "Risk level of the project funder",
"fundingRiskLevel": "Risk level of the external funding",
"totalRiskLevel": "Total risk level of the project",
- "noRisk": "No identifiable risk"
+ "noRisk": "No identifiable risk",
+ "sanctionsRisk": "*Read more information about the sanctions at [sanctionsmap.eu](https://sanctionsmap.eu/#/main)*"
},
"results": {
"title": "Sammanfattning av dina val",
diff --git a/src/client/types.ts b/src/client/types.ts
index e42dbbf..5f1b838 100644
--- a/src/client/types.ts
+++ b/src/client/types.ts
@@ -84,4 +84,5 @@ export type CountryData = {
hci: number
safetyLevel: number
universities: string[]
+ sanctions: object[]
}
diff --git a/src/server/data/sanctions/sanctionsMap.ts b/src/server/data/sanctions/sanctionsMap.ts
index f9a172c..75eff77 100644
--- a/src/server/data/sanctions/sanctionsMap.ts
+++ b/src/server/data/sanctions/sanctionsMap.ts
@@ -7,7 +7,7 @@ const fetchSanctionsData = async (countryName: string | undefined) => {
const countrySanctions = data.data.find(
(c: any) => c.country.data.title === countryName
- ).legal_acts
+ )?.legal_acts.data
if (!countrySanctions) return null