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 ,