mirror of
https://github.com/vercel/commerce.git
synced 2025-07-22 20:26:49 +00:00
🎨 styles: page verify customer account
:%s
This commit is contained in:
@@ -12,5 +12,16 @@
|
|||||||
.message {
|
.message {
|
||||||
margin-bottom: 1.6rem;
|
margin-bottom: 1.6rem;
|
||||||
}
|
}
|
||||||
|
.bottom {
|
||||||
|
@apply flex justify-center items-center flex-col;
|
||||||
|
a {
|
||||||
|
margin-right: 1.6rem;
|
||||||
|
margin-bottom: 1.6rem;
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
|
button {
|
||||||
|
@apply w-full;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -2,15 +2,22 @@ import { useRouter } from 'next/router'
|
|||||||
import { useEffect, useState } from 'react'
|
import { useEffect, useState } from 'react'
|
||||||
import { ButtonCommon } from 'src/components/common'
|
import { ButtonCommon } from 'src/components/common'
|
||||||
import LoadingCommon from 'src/components/common/LoadingCommon/LoadingCommon'
|
import LoadingCommon from 'src/components/common/LoadingCommon/LoadingCommon'
|
||||||
import { useVerifyCustomer } from 'src/components/hooks'
|
import { useModalCommon, useVerifyCustomer } from 'src/components/hooks'
|
||||||
import { ROUTE } from 'src/utils/constanst.utils'
|
import { ROUTE } from 'src/utils/constanst.utils'
|
||||||
import s from './VerifyCustomerAccount.module.scss'
|
import s from './VerifyCustomerAccount.module.scss'
|
||||||
import Link from 'next/link'
|
import Link from 'next/link'
|
||||||
|
import { LANGUAGE } from 'src/utils/language.utils'
|
||||||
|
import ModalAuthenticate from 'src/components/common/ModalAuthenticate/ModalAuthenticate'
|
||||||
|
|
||||||
export default function VerifyCustomerAccount() {
|
export default function VerifyCustomerAccount() {
|
||||||
const router = useRouter()
|
const router = useRouter()
|
||||||
const [isVerified, setIsVerified] = useState<boolean>(false)
|
const [isVerified, setIsVerified] = useState<boolean>(false)
|
||||||
const { error, loading, verify } = useVerifyCustomer()
|
const { error, loading, verify } = useVerifyCustomer()
|
||||||
|
const {
|
||||||
|
visible: visibleModalAuthen,
|
||||||
|
closeModal: closeModalAuthen,
|
||||||
|
openModal: openModalAuthen,
|
||||||
|
} = useModalCommon({ initialValue: false })
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
const token = router.query.token
|
const token = router.query.token
|
||||||
@@ -37,14 +44,27 @@ export default function VerifyCustomerAccount() {
|
|||||||
</div>
|
</div>
|
||||||
) : (
|
) : (
|
||||||
<div className={s.result}>
|
<div className={s.result}>
|
||||||
<div className={s.message}>Congratulation! Verified account successfully</div>
|
<div className={s.message}>
|
||||||
<Link href={ROUTE.HOME}>
|
Congratulation! Verified account successfully
|
||||||
<a href="">
|
</div>
|
||||||
<ButtonCommon>Back to home</ButtonCommon>
|
<div className={s.bottom}>
|
||||||
</a>
|
<Link href={ROUTE.HOME}>
|
||||||
</Link>
|
<a href="">
|
||||||
|
<ButtonCommon type="light">Back to home</ButtonCommon>
|
||||||
|
</a>
|
||||||
|
</Link>
|
||||||
|
|
||||||
|
<ButtonCommon onClick={openModalAuthen}>
|
||||||
|
{LANGUAGE.BUTTON_LABEL.SIGNIN}
|
||||||
|
</ButtonCommon>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
)}
|
)}
|
||||||
|
|
||||||
|
<ModalAuthenticate
|
||||||
|
visible={visibleModalAuthen}
|
||||||
|
closeModal={closeModalAuthen}
|
||||||
|
/>
|
||||||
</div>
|
</div>
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user