Move config outside function
This commit is contained in:
parent
1a9bbcbc98
commit
3b23e769cf
@ -4,29 +4,28 @@ import { useNavigate } from 'react-router-dom';
|
|||||||
import { Box, Typography } from '@mui/material'
|
import { Box, Typography } from '@mui/material'
|
||||||
import SumsubWebSdk from '@sumsub/websdk-react'
|
import SumsubWebSdk from '@sumsub/websdk-react'
|
||||||
|
|
||||||
const UserVerification = () => {
|
const config = {
|
||||||
|
lang: "en", //language of WebSDK texts and comments (ISO 639-1 format)
|
||||||
|
theme: "light",
|
||||||
|
}
|
||||||
|
|
||||||
|
const options = {
|
||||||
|
addViewportTag: false,
|
||||||
|
adaptIframeHeight: true
|
||||||
|
}
|
||||||
|
|
||||||
|
const UserVerification = () => {
|
||||||
const [userId, setUserId] = useState<String>('');
|
const [userId, setUserId] = useState<String>('');
|
||||||
const [applicationSubmitted, setApplicationSubmitted] = useState<boolean>(false);
|
const [applicationSubmitted, setApplicationSubmitted] = useState<boolean>(false);
|
||||||
|
|
||||||
const navigate = useNavigate();
|
const navigate = useNavigate();
|
||||||
|
|
||||||
useEffect(()=>{
|
useEffect(()=>{
|
||||||
if (applicationSubmitted) {
|
if (applicationSubmitted && userId !== '') {
|
||||||
navigate(`/sign-with-nitro-key/${userId}`)
|
navigate(`/sign-with-nitro-key/${userId}`)
|
||||||
}
|
}
|
||||||
}, [applicationSubmitted, userId, navigate]);
|
}, [applicationSubmitted, userId, navigate]);
|
||||||
|
|
||||||
const config = {
|
|
||||||
lang: "en", //language of WebSDK texts and comments (ISO 639-1 format)
|
|
||||||
theme: "light",
|
|
||||||
}
|
|
||||||
|
|
||||||
const options = {
|
|
||||||
addViewportTag: false,
|
|
||||||
adaptIframeHeight: true
|
|
||||||
}
|
|
||||||
|
|
||||||
// TODO: Implement
|
// TODO: Implement
|
||||||
const accessTokenExpirationHandler = async () => {
|
const accessTokenExpirationHandler = async () => {
|
||||||
alert("Please renew token");
|
alert("Please renew token");
|
||||||
|
Loading…
Reference in New Issue
Block a user