From ac0f2ba685726e9e6c2bd5f0b9b2c2c94ed53889 Mon Sep 17 00:00:00 2001 From: Dakota Dutko Date: Tue, 12 Nov 2024 14:51:56 -0500 Subject: [PATCH] Adds chime quickstart items and basic empty mission page behind feature flag (#2702) --- .../NoticeTypeCheckboxes/NoticeTypeCheckboxes.tsx | 5 +++++ app/routes/missions.chime/route.mdx | 13 +++++++++++++ app/routes/missions.tsx | 6 ++++++ 3 files changed, 24 insertions(+) create mode 100644 app/routes/missions.chime/route.mdx diff --git a/app/components/NoticeTypeCheckboxes/NoticeTypeCheckboxes.tsx b/app/components/NoticeTypeCheckboxes/NoticeTypeCheckboxes.tsx index 8dfd2adbb..84c18bd10 100644 --- a/app/components/NoticeTypeCheckboxes/NoticeTypeCheckboxes.tsx +++ b/app/components/NoticeTypeCheckboxes/NoticeTypeCheckboxes.tsx @@ -244,6 +244,11 @@ export function NoticeTypeCheckboxes({ JsonNoticeTypeLinks['Super Kamiokande'] = '/missions/sksn' } + if (useFeature('CHIME')) { + JsonNoticeTypes.Chime = ['gcn.notices.chime.alert'] + JsonNoticeTypeLinks.Chime = '/missions/chime' + } + const counterfunction = (childRef: HTMLInputElement) => { if (childRef.checked) { userSelected.add(childRef.name) diff --git a/app/routes/missions.chime/route.mdx b/app/routes/missions.chime/route.mdx new file mode 100644 index 000000000..40422983a --- /dev/null +++ b/app/routes/missions.chime/route.mdx @@ -0,0 +1,13 @@ +--- +handle: + breadcrumb: Chime +--- + +import { feature } from '~/lib/env.server' + +export async function loader() { + if (!feature('CHIME')) throw new Response(null, { status: 404 }) + return null +} + +# Chime diff --git a/app/routes/missions.tsx b/app/routes/missions.tsx index f645b3600..69aa2ced3 100644 --- a/app/routes/missions.tsx +++ b/app/routes/missions.tsx @@ -9,6 +9,7 @@ import { NavLink, Outlet } from '@remix-run/react' import { GridContainer } from '@trussworks/react-uswds' import { SideNav } from '~/components/SideNav' +import { useFeature } from '~/root' import type { BreadcrumbHandle } from '~/root/Title' export const handle: BreadcrumbHandle = { breadcrumb: 'Missions' } @@ -32,6 +33,11 @@ export default function () { CALET , + useFeature('CHIME') && ( + + Chime + + ), Einstein Probe ,