admin base url
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
VITE_TOKEN_NAME = 'dsc_token'
|
||||
VITE_REFRESH_TOKEN_NAME = 'dsc_refresh_token'
|
||||
VITE_DANAK_BASE_URL ='https://api.danakcorp.com'
|
||||
VITE_BASE_URL = 'http://192.168.1.134:4000'
|
||||
# VITE_BASE_URL = 'https://dmail-api.danakcorp.com'
|
||||
# VITE_BASE_URL = 'http://192.168.1.134:4000'
|
||||
VITE_BASE_URL = 'https://dmail-api.danakcorp.com'
|
||||
VITE_SERVICE_ID = 'e51afdc3-ea0b-49cf-8f49-2a6f131b024e'
|
||||
|
||||
@@ -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'>
|
||||
|
||||
Reference in New Issue
Block a user