summaryrefslogtreecommitdiff
path: root/src/lib
diff options
context:
space:
mode:
authorHATEC\SPVDEV001 <tri.susilo@altama.co.id>2024-02-09 10:19:28 +0700
committerHATEC\SPVDEV001 <tri.susilo@altama.co.id>2024-02-09 10:19:28 +0700
commit2e38ec15d42201c26c48f9bcf856750204db0582 (patch)
tree3fb3d1c0f392c355076ae70dc6fc2b6827a0cd33 /src/lib
parent76e3eec8db414307cea6b11e3ebb461aed8e1e26 (diff)
fixing error form form sales
Diffstat (limited to 'src/lib')
-rw-r--r--src/lib/form/components/KunjunganSales.jsx4
-rw-r--r--src/lib/form/components/KunjunganService.jsx4
-rw-r--r--src/lib/form/components/Merchant.jsx4
-rw-r--r--src/lib/form/components/PembayaranTempo.jsx4
-rw-r--r--src/lib/form/components/RequestForQuotation.jsx4
-rw-r--r--src/lib/form/components/SuratDukungan.jsx4
6 files changed, 12 insertions, 12 deletions
diff --git a/src/lib/form/components/KunjunganSales.jsx b/src/lib/form/components/KunjunganSales.jsx
index 29940edf..ffa8f135 100644
--- a/src/lib/form/components/KunjunganSales.jsx
+++ b/src/lib/form/components/KunjunganSales.jsx
@@ -35,7 +35,7 @@ const KunjunganSales = () => {
const recaptchaRef = useRef(null)
useEffect(() => {
- if(!auth) {
+ if(auth == false) {
router.push('/login')
}
const loadCities = async () => {
@@ -50,7 +50,7 @@ const KunjunganSales = () => {
loadCompanyTypes()
loadCities()
- }, [])
+ }, [auth])
const onSubmitHandler = async (values) => {
const recaptchaValue = recaptchaRef.current.getValue()
diff --git a/src/lib/form/components/KunjunganService.jsx b/src/lib/form/components/KunjunganService.jsx
index 0e1d1ab3..5720d14e 100644
--- a/src/lib/form/components/KunjunganService.jsx
+++ b/src/lib/form/components/KunjunganService.jsx
@@ -33,7 +33,7 @@ const CreateKunjunganService = () => {
const recaptchaRef = useRef(null)
useEffect(() => {
- if(!auth) {
+ if(auth == false) {
router.push('/login')
}
const loadCities = async () => {
@@ -42,7 +42,7 @@ const CreateKunjunganService = () => {
setCities(dataCities)
}
loadCities()
- }, [])
+ }, [auth])
const onSubmitHandler = async (values) => {
const recaptchaValue = recaptchaRef.current.getValue()
diff --git a/src/lib/form/components/Merchant.jsx b/src/lib/form/components/Merchant.jsx
index 770bfb82..85f72bf8 100644
--- a/src/lib/form/components/Merchant.jsx
+++ b/src/lib/form/components/Merchant.jsx
@@ -58,7 +58,7 @@ const CreateMerchant = () => {
const auth = useAuth()
useEffect(() => {
- if(!auth) {
+ if(auth == false) {
router.push('/login')
}
const loadCities = async () => {
@@ -70,7 +70,7 @@ const CreateMerchant = () => {
setCities(dataCities);
};
loadCities();
- }, []);
+ }, [auth]);
const onSubmitHandler = async (values) => {
const recaptchaValue = recaptchaRef.current.getValue();
diff --git a/src/lib/form/components/PembayaranTempo.jsx b/src/lib/form/components/PembayaranTempo.jsx
index 73ceee49..9591a0b0 100644
--- a/src/lib/form/components/PembayaranTempo.jsx
+++ b/src/lib/form/components/PembayaranTempo.jsx
@@ -29,10 +29,10 @@ const PembayaranTempo = () => {
const auth = useAuth()
useEffect(() => {
- if(!auth) {
+ if(auth) {
router.push('/login')
}
- },[])
+ },[auth])
const onSubmitHandler = async (values) => {
const recaptchaValue = recaptchaRef.current.getValue()
diff --git a/src/lib/form/components/RequestForQuotation.jsx b/src/lib/form/components/RequestForQuotation.jsx
index 34434dd5..68b7fa17 100644
--- a/src/lib/form/components/RequestForQuotation.jsx
+++ b/src/lib/form/components/RequestForQuotation.jsx
@@ -35,7 +35,7 @@ const RequestForQuotation = () => {
useEffect(() => {
- if(!auth) {
+ if(auth == false) {
router.push('/login')
}
const loadCities = async () => {
@@ -44,7 +44,7 @@ const RequestForQuotation = () => {
setCities(dataCities)
}
loadCities()
- }, [])
+ }, [auth])
const onSubmitHandler = async (values) => {
const recaptchaValue = recaptchaRef.current.getValue()
diff --git a/src/lib/form/components/SuratDukungan.jsx b/src/lib/form/components/SuratDukungan.jsx
index 0b3b650e..31e7ee83 100644
--- a/src/lib/form/components/SuratDukungan.jsx
+++ b/src/lib/form/components/SuratDukungan.jsx
@@ -33,7 +33,7 @@ const CreateSuratDukungan = () => {
const auth = useAuth()
useEffect(() => {
- if(!auth) {
+ if(auth == false) {
router.push('/login')
}
const loadCities = async () => {
@@ -45,7 +45,7 @@ const CreateSuratDukungan = () => {
setCities(dataCities);
};
loadCities();
- }, []);
+ }, [auth]);
const onSubmitHandler = async (values) => {
const recaptchaValue = recaptchaRef.current.getValue();