Skip to content

Commit ade84aa

Browse files
committed
fix: show ICRC presence only for partner countries
1 parent f82f846 commit ade84aa

File tree

2 files changed

+49
-37
lines changed

2 files changed

+49
-37
lines changed

.changeset/slow-bobcats-joke.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
---
2+
"go-web-app": patch
3+
---
4+
5+
Display ICRC Presence
6+
7+
- Display ICRC presence across partner countries
8+
- Highlight key operational countries

app/src/views/CountryNsOverviewSupportingPartners/Presence/index.tsx

Lines changed: 41 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -169,49 +169,53 @@ function Presence() {
169169
)}
170170
</div>
171171
</Container>
172-
<Container
173-
className={styles.presenceCard}
174-
heading={strings.countryICRCPresenceTitle}
175-
footerActions={isDefined(countryResponse?.icrc_presence?.url) && (
176-
<TextOutput
177-
label={strings.source}
178-
value={(
172+
{countryResponse?.icrc_presence?.icrc_presence && (
173+
<Container
174+
className={styles.presenceCard}
175+
heading={strings.countryICRCPresenceTitle}
176+
footerActions={isDefined(countryResponse.icrc_presence.url) && (
177+
<TextOutput
178+
label={strings.source}
179+
value={(
180+
<Link
181+
variant="tertiary"
182+
href={countryResponse.icrc_presence.url}
183+
external
184+
withUnderline
185+
>
186+
{strings.icrc}
187+
</Link>
188+
)}
189+
/>
190+
)}
191+
withHeaderBorder
192+
withInternalPadding
193+
>
194+
{
195+
resolveToString(
196+
strings.countryICRCConfirmedPartner,
197+
{ year },
198+
)
199+
}
200+
{countryResponse.icrc_presence.key_operation && (
201+
<div className={styles.icrcPresenceItem}>
179202
<Link
180-
variant="tertiary"
203+
key={countryResponse.icrc_presence.id}
181204
href={countryResponse.icrc_presence.url}
182205
external
206+
variant="tertiary"
183207
withUnderline
184208
>
185-
{strings.icrc}
209+
{strings.countryICRCKeyOperations}
186210
</Link>
187-
)}
188-
/>
189-
)}
190-
withHeaderBorder
191-
withInternalPadding
192-
>
193-
{resolveToString(
194-
strings.countryICRCConfirmedPartner,
195-
{ year },
196-
)}
197-
{countryResponse?.icrc_presence?.key_operation && (
198-
<div className={styles.icrcPresenceItem}>
199-
<Link
200-
key={countryResponse?.icrc_presence.id}
201-
href={countryResponse?.icrc_presence.url}
202-
external
203-
variant="tertiary"
204-
withUnderline
205-
>
206-
{strings.countryICRCKeyOperations}
207-
</Link>
208-
{resolveToString(
209-
strings.countryICRCWithin,
210-
{ name: countryResponse?.name ?? '--' },
211-
)}
212-
</div>
213-
)}
214-
</Container>
211+
{resolveToString(
212+
strings.countryICRCWithin,
213+
{ name: countryResponse.name ?? '--' },
214+
)}
215+
</div>
216+
)}
217+
</Container>
218+
)}
215219
</Container>
216220
);
217221
}

0 commit comments

Comments
 (0)