mirror of
https://github.com/maelgangloff/domain-watchdog.git
synced 2025-12-29 16:15:04 +00:00
feat: start Connector page
This commit is contained in:
@@ -29,14 +29,18 @@ export default function WatchlistPage() {
|
||||
|
||||
const refreshWatchlists = () => getWatchlists().then(w => {
|
||||
setWatchlists(w['hydra:member'])
|
||||
}).catch(() => setWatchlists(undefined))
|
||||
}).catch((e: AxiosError) => {
|
||||
const data = e?.response?.data as { detail: string }
|
||||
messageApi.error(data.detail ?? t`An error occurred`)
|
||||
setWatchlists(undefined)
|
||||
})
|
||||
|
||||
useEffect(() => {
|
||||
refreshWatchlists()
|
||||
}, [])
|
||||
|
||||
return <Flex gap="middle" align="center" justify="center" vertical>
|
||||
<Card title={t`Create a watchlist`} style={{width: '100%'}}>
|
||||
<Card title={t`Create a Watchlist`} style={{width: '100%'}}>
|
||||
{contextHolder}
|
||||
<WatchlistForm form={form} onCreateWatchlist={onCreateWatchlist}/>
|
||||
</Card>
|
||||
|
||||
Reference in New Issue
Block a user