mirror of
https://github.com/maelgangloff/domain-watchdog.git
synced 2025-12-29 16:15:04 +00:00
fix: ttag doesn't support typescript expressions
This commit is contained in:
@@ -18,6 +18,7 @@ import WatchlistSelectionModal from '../../components/tracking/watchlist/Watchli
|
|||||||
export default function DomainSearchPage() {
|
export default function DomainSearchPage() {
|
||||||
const {query} = useParams()
|
const {query} = useParams()
|
||||||
const [domain, setDomain] = useState<Domain | null>()
|
const [domain, setDomain] = useState<Domain | null>()
|
||||||
|
const domainLdhName = domain?.ldhName
|
||||||
const [loading, setLoading] = useState(false)
|
const [loading, setLoading] = useState(false)
|
||||||
const [addToWatchlistModal, setAddToWatchlistModal] = useState(false)
|
const [addToWatchlistModal, setAddToWatchlistModal] = useState(false)
|
||||||
|
|
||||||
@@ -47,7 +48,9 @@ export default function DomainSearchPage() {
|
|||||||
const addToWatchlist = async (watchlist: Watchlist) => {
|
const addToWatchlist = async (watchlist: Watchlist) => {
|
||||||
await addDomainToWatchlist(watchlist, domain!.ldhName).then(() => {
|
await addDomainToWatchlist(watchlist, domain!.ldhName).then(() => {
|
||||||
setAddToWatchlistModal(false)
|
setAddToWatchlistModal(false)
|
||||||
messageApi.success(t`${domain?.ldhName} added to ${watchlist.name}`)
|
|
||||||
|
const ldhName = domain?.ldhName
|
||||||
|
messageApi.success(t`${ldhName} added to ${watchlist.name}`)
|
||||||
}).catch((e: AxiosError) => {
|
}).catch((e: AxiosError) => {
|
||||||
showErrorAPI(e, messageApi)
|
showErrorAPI(e, messageApi)
|
||||||
})
|
})
|
||||||
@@ -86,7 +89,7 @@ export default function DomainSearchPage() {
|
|||||||
open={addToWatchlistModal}
|
open={addToWatchlistModal}
|
||||||
onFinish={addToWatchlist}
|
onFinish={addToWatchlist}
|
||||||
modalProps={{
|
modalProps={{
|
||||||
title: t`Add ${domain?.ldhName} to a watchlist`,
|
title: t`Add ${domainLdhName} to a watchlist`,
|
||||||
onCancel: () => setAddToWatchlistModal(false),
|
onCancel: () => setAddToWatchlistModal(false),
|
||||||
onClose: () => setAddToWatchlistModal(false),
|
onClose: () => setAddToWatchlistModal(false),
|
||||||
}}
|
}}
|
||||||
|
|||||||
Reference in New Issue
Block a user