mirror of
https://github.com/maelgangloff/domain-watchdog.git
synced 2025-12-17 09:45:29 +00:00
26 lines
863 B
TypeScript
26 lines
863 B
TypeScript
import React from 'react'
|
|
import type {Connector} from '../../../utils/api/connectors'
|
|
import {WatchlistCard} from './WatchlistCard'
|
|
import type {Watchlist} from '../../../utils/api'
|
|
|
|
export function WatchlistsList({watchlists, onDelete, onUpdateWatchlist, connectors}: {
|
|
watchlists: Watchlist[]
|
|
onDelete: () => void
|
|
onUpdateWatchlist: (values: { domains: string[], triggers: string[], token: string }) => Promise<void>
|
|
connectors: Array<Connector & { id: string }>
|
|
}) {
|
|
return (
|
|
<>
|
|
{watchlists.map(watchlist =>
|
|
<WatchlistCard
|
|
key={watchlist.token}
|
|
watchlist={watchlist}
|
|
onUpdateWatchlist={onUpdateWatchlist}
|
|
connectors={connectors}
|
|
onDelete={onDelete}
|
|
/>
|
|
)}
|
|
</>
|
|
)
|
|
}
|