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 [searchParams] = useSearchParams();
const jwtToken = searchParams.get("token"); const jwtToken = searchParams.get("token");
const isForce = searchParams.get("force"); const isForce = searchParams.get("force");
if (isForce === "true") {
dispatch(actions.userConfig.addIsForceShortPath(true)); useEffect(() => {
} if (isForce === "true") {
if (isForce === "false") { dispatch(actions.userConfig.addIsForceShortPath(true));
dispatch(actions.userConfig.addIsForceShortPath(false)); } else {
} dispatch(actions.userConfig.addIsForceShortPath(false));
}
// eslint-disable-next-line react-hooks/exhaustive-deps
}, []);
const isForceShortPath = useSelector(selectors.selectIsForceShortPath); const isForceShortPath = useSelector(selectors.selectIsForceShortPath);
const { gender: genderFromStore } = useSelector( const { gender: genderFromStore } = useSelector(
selectors.selectQuestionnaire selectors.selectQuestionnaire