fixed some build bug issues

This commit was merged in pull request #850.
This commit is contained in:
Victor
2024-11-20 19:24:19 +01:00
parent f5eef3f679
commit b6908b84af
16 changed files with 48 additions and 33 deletions
+5 -4
View File
@@ -20,12 +20,13 @@ import GoogleDownload from '../../../assets/images/download/andriod.jpg'
import IOSDownload from '../../../assets/images/download/apple.jpg'
export default function Login() {
const dispatch = useDispatch();
const location = useLocation();
// eslint-disable-next-line no-restricted-globals
const queryParams = new URLSearchParams(location?.search);
// const sessionExpired = queryParams.get("sessionExpired");
const dispatch = useDispatch();
const { state } = useLocation();
const [sessionExpired, setSessionExpired] = useState(
queryParams.get("sessionExpired")
@@ -200,8 +201,8 @@ export default function Login() {
// }, []);
useEffect(()=>{
if(state && state.loginType){
setLoginType(state.loginType)
if(location?.state && location?.state.loginType){
setLoginType(location?.state.loginType)
}else{
navigate('/login', {replace: true})
}