Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

adds initial km3net notice and mission page link #2629

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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 @@
JsonNoticeTypeLinks['Super Kamiokande'] = '/missions/sksn'
}

if (useFeature('KM3NET_QUICKSTART')) {
JsonNoticeTypes.KM3NET = ['gcn.notices.km3net']
JsonNoticeTypeLinks.KM3NET = '/missions/km3net'

Check warning on line 249 in app/components/NoticeTypeCheckboxes/NoticeTypeCheckboxes.tsx

View check run for this annotation

Codecov / codecov/patch

app/components/NoticeTypeCheckboxes/NoticeTypeCheckboxes.tsx#L248-L249

Added lines #L248 - L249 were not covered by tests
}

const counterfunction = (childRef: HTMLInputElement) => {
if (childRef.checked) {
userSelected.add(childRef.name)
Expand Down
13 changes: 13 additions & 0 deletions app/routes/missions.km3net.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
---
handle:
breadcrumb: KM3Net
---

import { feature } from '~/lib/env.server'

export async function loader() {
if (!feature('KM3NET_QUICKSTART')) throw new Response(null, { status: 404 })
return null
}

# KM3NeT
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 { GridContainer } from '@trussworks/react-uswds'

import { SideNav } from '~/components/SideNav'
import { useFeature } from '~/root'

Check warning on line 12 in app/routes/missions.tsx

View check run for this annotation

Codecov / codecov/patch

app/routes/missions.tsx#L12

Added line #L12 was not covered by tests
import type { BreadcrumbHandle } from '~/root/Title'

export const handle: BreadcrumbHandle = { breadcrumb: 'Missions' }
Expand Down Expand Up @@ -50,6 +51,11 @@
<NavLink key="integral" to="integral">
INTEGRAL
</NavLink>,
useFeature('KM3NET_QUICKSTART') && (
<NavLink key="km3net" to="km3net">
KM3NeT
</NavLink>
),
<NavLink key="konus" to="konus">
Konus-Wind
</NavLink>,
Expand Down
Loading