-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
17 additions
and
22 deletions.
There are no files selected for viewing
38 changes: 16 additions & 22 deletions
38
src/frontend/src/components/NavBar/components/AppNavBar/components/Announcements/index.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,39 +1,33 @@ | ||
import { useSelector } from "react-redux"; | ||
import { selectCurrentPathogen } from "src/common/redux/selectors"; | ||
import { B } from "src/common/styles/basicStyle"; | ||
import { SplitPathogenWrapper } from "src/components/Split/SplitPathogenWrapper"; | ||
import { PATHOGEN_FEATURE_FLAGS } from "src/components/Split/types"; | ||
import { USER_FEATURE_FLAGS } from "src/components/Split/types"; | ||
import { StyledBanner, StyledNewTabLink } from "./style"; | ||
import { useTreatments } from "@splitsoftware/splitio-react"; | ||
import { isUserFlagOn } from "src/components/Split"; | ||
|
||
// Note: this was previously for privacy policy announcements | ||
// It was pretty convenient to reuse - maybe we want to keep | ||
// it around for one-off banners. | ||
|
||
// Show Banner on Covid pages to let the user know that we | ||
// are currently unable to ingest GISAID data | ||
// Show Banner to let users know we are sunsetting the app | ||
export const Announcements = (): JSX.Element => { | ||
const pathogen = useSelector(selectCurrentPathogen); | ||
const flag = useTreatments([USER_FEATURE_FLAGS.sunset_banner]); | ||
|
||
const shouldShowSunsetBanner = isUserFlagOn( | ||
flag, | ||
USER_FEATURE_FLAGS.sunset_banner | ||
); | ||
|
||
return ( | ||
<> | ||
<SplitPathogenWrapper | ||
pathogen={pathogen} | ||
feature={PATHOGEN_FEATURE_FLAGS.show_gisaid_ingestion_banner} | ||
> | ||
{shouldShowSunsetBanner && ( | ||
<StyledBanner sdsType="primary"> | ||
<B> | ||
As of 4/13/23, we have switched from using GISAID for phylo tree | ||
focal and contextual samples to using GenBank. | ||
</B> | ||
<StyledNewTabLink | ||
href={ | ||
"https://help.czgenepi.org/hc/en-us/articles/14696829683860-GISAID-to-GenBank-Transition" | ||
} | ||
> | ||
Learn more | ||
<B>CZ GEN EPI will shut down on March 7, 2024. Click </B> | ||
<StyledNewTabLink href={"https://help.czgenepi.org/hc/en-us"}> | ||
here | ||
</StyledNewTabLink> | ||
<B> to learn more.</B> | ||
</StyledBanner> | ||
</SplitPathogenWrapper> | ||
)} | ||
</> | ||
); | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters