import {Card, Divider, Popconfirm, Table, Tag, theme, Typography} from "antd"; import {t} from "ttag"; import {deleteWatchlist} from "../../utils/api"; import {DeleteFilled} from "@ant-design/icons"; import React from "react"; import useBreakpoint from "../../hooks/useBreakpoint"; import {actionToColor} from "../search/EventTimeline"; import {Watchlist} from "../../pages/tracking/WatchlistPage"; const {useToken} = theme; export function WatchlistsList({watchlists, onDelete}: { watchlists: Watchlist[], onDelete: () => void }) { const {token} = useToken() const sm = useBreakpoint('sm') const columns = [ { title: t`Domain names`, dataIndex: 'domains' }, { title: t`Tracked events`, dataIndex: 'events' } ] return <> {watchlists.map(watchlist => <> deleteWatchlist(watchlist.token).then(onDelete)} okText={t`Yes`} cancelText={t`No`} okButtonProps={{danger: true}}> } > <>{d.ldhName}
), events: watchlist.triggers?.filter(t => t.action === 'email') .map(t => {t.event}) }]} {...(sm ? {scroll: {y: 'max-content'}} : {scroll: {y: 240}})} /> )} }