From 530bc44efc4b49d425bd8d9fd71d0a2f21220344 Mon Sep 17 00:00:00 2001 From: Tyler Barna <57914086+tylerbarna@users.noreply.github.com> Date: Mon, 15 Jul 2024 10:33:28 -0500 Subject: [PATCH] Add SVOM JSON Notices to Quickstart UI (#2404) Resolves #2274. --- .../NoticeTypeCheckboxes/NoticeTypeCheckboxes.tsx | 6 ++++++ app/components/NoticeTypeCheckboxes/rates.ts | 1 + 2 files changed, 7 insertions(+) diff --git a/app/components/NoticeTypeCheckboxes/NoticeTypeCheckboxes.tsx b/app/components/NoticeTypeCheckboxes/NoticeTypeCheckboxes.tsx index 68ff70daa..e9acdb309 100644 --- a/app/components/NoticeTypeCheckboxes/NoticeTypeCheckboxes.tsx +++ b/app/components/NoticeTypeCheckboxes/NoticeTypeCheckboxes.tsx @@ -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 @@ -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) diff --git a/app/components/NoticeTypeCheckboxes/rates.ts b/app/components/NoticeTypeCheckboxes/rates.ts index ea955a857..a995bd19b 100644 --- a/app/components/NoticeTypeCheckboxes/rates.ts +++ b/app/components/NoticeTypeCheckboxes/rates.ts @@ -275,4 +275,5 @@ export const triggerRate: Record = { 'gcn.notices.swift.bat.guano': 0.0, 'igwn.gwalert': 90.42857142857143, 'gcn.notices.einstein_probe.wxt.alert': 0.27, + 'gcn.notices.svom': 0, }