Skip to content

Commit

Permalink
feat: use GDACS as the primary source for Imminent Risk Watch
Browse files Browse the repository at this point in the history
  • Loading branch information
samshara committed Nov 26, 2024
1 parent 8485076 commit 7cf2514
Show file tree
Hide file tree
Showing 3 changed files with 35 additions and 29 deletions.
5 changes: 5 additions & 0 deletions .changeset/pink-beans-develop.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"go-web-app": patch
---

Prioritize GDACS as the Primary Source for Imminent Risk Watch in [#1547](https://github.com/IFRCGo/go-web-app/issues/1547)
3 changes: 2 additions & 1 deletion .changeset/slimy-eggs-peel.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,5 @@
"go-web-app": patch
---

Add Organization type and Learning type filter in Operational learning
Add Organization type and Learning type filter in Operational learning in [#1469](https://github.com/IFRCGo/go-web-app/issues/1469)

56 changes: 28 additions & 28 deletions app/src/components/domain/RiskImminentEvents/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ type Props = BaseProps & ({
function RiskImminentEvents(props: Props) {
const {
className,
defaultSource = 'pdc',
defaultSource = 'gdacs',
...otherProps
} = props;
const [activeView, setActiveView] = useState<ImminentEventSource>(defaultSource);
Expand Down Expand Up @@ -168,6 +168,33 @@ function RiskImminentEvents(props: Props) {
footerActionsContainerClassName={styles.footerActions}
footerActions={(
<>
<Radio
name="gdacs"
value={activeView === 'gdacs'}
onClick={handleRadioClick}
label={strings.imminentEventsSourceGdacsLabel}
actions={(
<InfoPopup
title={strings.gdacsTitle}
popupClassName={styles.popup}
descriptionClassName={styles.description}
description={resolveToComponent(
strings.gdacsDescription,
{
here: (
<Link
href="https://www.gdacs.org/default.aspx"
variant="tertiary"
external
>
{strings.here}
</Link>
),
},
)}
/>
)}
/>
<Radio
name="pdc"
value={activeView === 'pdc'}
Expand Down Expand Up @@ -224,33 +251,6 @@ function RiskImminentEvents(props: Props) {
)}
/>
)}
<Radio
name="gdacs"
value={activeView === 'gdacs'}
onClick={handleRadioClick}
label={strings.imminentEventsSourceGdacsLabel}
actions={(
<InfoPopup
title={strings.gdacsTitle}
popupClassName={styles.popup}
descriptionClassName={styles.description}
description={resolveToComponent(
strings.gdacsDescription,
{
here: (
<Link
href="https://www.gdacs.org/default.aspx"
variant="tertiary"
external
>
{strings.here}
</Link>
),
},
)}
/>
)}
/>
{environment !== 'production' && (
<Radio
name="meteoSwiss"
Expand Down

0 comments on commit 7cf2514

Please sign in to comment.