diff --git a/src/api/common.ts b/src/api/common.ts index bf5850f9..105779b8 100644 --- a/src/api/common.ts +++ b/src/api/common.ts @@ -22,6 +22,21 @@ export const MEDIA_OPTIONS = [ ] as const; export type MediaOptions = (typeof MEDIA_OPTIONS)[number]; +export const SOCIAL_MEDIA_OPTIONS = [ + "twitter", + // "tiktok", + // "instagram", + // "RSS", + // "truthsocial", + // "youtube", + // "facebook", +] as const satisfies readonly MediaOptions[]; + +export const ALERT_MEDIA_OPTIONS = [ + "ioda", + "cloudflare", +] as const satisfies readonly MediaOptions[]; + export const DATA_SOURCE_OPTIONS = [ "Active Probing", "BGP", diff --git a/src/pages/Reports/AllReportsList.tsx b/src/pages/Reports/AllReportsList.tsx index 31745476..705754a5 100644 --- a/src/pages/Reports/AllReportsList.tsx +++ b/src/pages/Reports/AllReportsList.tsx @@ -7,6 +7,7 @@ import { useQueryParams } from "../../hooks/useQueryParams"; import { formatPageCount } from "../../utils/format"; import { getReports } from "../../api/reports"; import type { ReportQueryState } from "../../api/reports/types"; +import { ALERT_MEDIA_OPTIONS, SOCIAL_MEDIA_OPTIONS } from "../../api/common"; import ReportListItem from "./components/ReportListItem"; import ReportsFilters from "./components/ReportsFilters"; @@ -55,6 +56,10 @@ const AllReportsList = ({ alerts }: IProps) => { navigate({ pathname: `${id}`, search: searchParams.toString() }); } + const platformOptions = alerts + ? [...ALERT_MEDIA_OPTIONS] + : [...SOCIAL_MEDIA_OPTIONS]; + return ( <>