Skip to content

Commit

Permalink
Add SVOM JSON Notices to Quickstart UI (#2404)
Browse files Browse the repository at this point in the history
Resolves #2274.
  • Loading branch information
tylerbarna authored Jul 15, 2024
1 parent 986da3c commit 530bc44
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
6 changes: 6 additions & 0 deletions app/components/NoticeTypeCheckboxes/NoticeTypeCheckboxes.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ import { useState } from 'react'
import type { NoticeFormat } from '../NoticeFormat'
import { NestedCheckboxes } from '../nested-checkboxes/NestedCheckboxes'
import { triggerRate } from './rates'
import { useFeature } from '~/root'

const minRate = 1 / 7

Expand Down Expand Up @@ -221,6 +222,11 @@ export function NoticeTypeCheckboxes({
const [selectedCounter, setSelectedCounter] = useState(0)
const [alertEstimate, setAlertEstimate] = useState(0)

if (useFeature('SVOM_QUICKSTART')) {
JsonNoticeTypes.SVOM = ['gcn.notices.svom']
JsonNoticeTypeLinks.SVOM = '/missions/svom'
}

const counterfunction = (childRef: HTMLInputElement) => {
if (childRef.checked) {
userSelected.add(childRef.name)
Expand Down
1 change: 1 addition & 0 deletions app/components/NoticeTypeCheckboxes/rates.ts
Original file line number Diff line number Diff line change
Expand Up @@ -275,4 +275,5 @@ export const triggerRate: Record<string, number> = {
'gcn.notices.swift.bat.guano': 0.0,
'igwn.gwalert': 90.42857142857143,
'gcn.notices.einstein_probe.wxt.alert': 0.27,
'gcn.notices.svom': 0,
}

0 comments on commit 530bc44

Please sign in to comment.