Skip to content

Commit

Permalink
Adds chime quickstart items and basic empty mission page behind featu…
Browse files Browse the repository at this point in the history
…re flag (#2702)
  • Loading branch information
dakota002 authored Nov 12, 2024
1 parent 7c94cb4 commit ac0f2ba
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 0 deletions.
5 changes: 5 additions & 0 deletions app/components/NoticeTypeCheckboxes/NoticeTypeCheckboxes.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
13 changes: 13 additions & 0 deletions app/routes/missions.chime/route.mdx
Original file line number Diff line number Diff line change
@@ -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
6 changes: 6 additions & 0 deletions app/routes/missions.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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' }
Expand All @@ -32,6 +33,11 @@ export default function () {
<NavLink key="calet" to="calet">
CALET
</NavLink>,
useFeature('CHIME') && (
<NavLink key="chime" to="chime">
Chime
</NavLink>
),
<NavLink key="einstein-probe" to="einstein-probe">
Einstein Probe
</NavLink>,
Expand Down

0 comments on commit ac0f2ba

Please sign in to comment.