admin base url

This commit is contained in:
hamid zarghami
2025-07-10 10:47:29 +03:30
parent 3ab058bf03
commit 6d564e4045
2 changed files with 13 additions and 5 deletions
+11 -3
View File
@@ -2,7 +2,7 @@ import Input from '@/components/Input'
import Select from '@/components/Select'
import Table from '@/components/Table'
import { ColumnType } from '@/components/types/TableTypes'
import { FC, useState } from 'react'
import { FC, useEffect, useState } from 'react'
import { useTranslation } from 'react-i18next'
import Button from '@/components/Button'
import { TickCircle } from 'iconsax-react'
@@ -35,11 +35,11 @@ const Address: FC = () => {
const { data: domain } = useGetDomains()
const { mutate: createAddress, isPending } = useCreateAddress()
const { data: addresses, isPending: isPendingAddress } = useGetAddress(search, status)
const { register, handleSubmit, formState: { errors },
const { register, handleSubmit, formState: { errors }, setValue
} = useForm<CreateAddressType>({
resolver: yupResolver(schema),
defaultValues: {
domainId: domain?.data?.domain?.id || '',
domainId: domain?.data?.domain?.id,
}
})
@@ -100,6 +100,14 @@ const Address: FC = () => {
})
}
useEffect(() => {
if (domain?.data?.domain?.id) {
setValue('domainId', domain?.data?.domain?.id)
}
}, [domain])
return (
<div className='flex xl:flex-row flex-col-reverse gap-8 mt-8'>
<div className='flex-1'>