fix: force parameter

This commit is contained in:
gofnnp 2024-04-15 20:39:13 +04:00
parent 1704df4cc8
commit d0bbb296b7

View File

@ -139,12 +139,16 @@ function App(): JSX.Element {
const [searchParams] = useSearchParams();
const jwtToken = searchParams.get("token");
const isForce = searchParams.get("force");
if (isForce === "true") {
dispatch(actions.userConfig.addIsForceShortPath(true));
}
if (isForce === "false") {
dispatch(actions.userConfig.addIsForceShortPath(false));
}
useEffect(() => {
if (isForce === "true") {
dispatch(actions.userConfig.addIsForceShortPath(true));
} else {
dispatch(actions.userConfig.addIsForceShortPath(false));
}
// eslint-disable-next-line react-hooks/exhaustive-deps
}, []);
const isForceShortPath = useSelector(selectors.selectIsForceShortPath);
const { gender: genderFromStore } = useSelector(
selectors.selectQuestionnaire