Skip to content

Commit

Permalink
Update Login.jsx
Browse files Browse the repository at this point in the history
  • Loading branch information
dobri1408 authored Oct 11, 2024
1 parent c2841c0 commit 2fbcfcf
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion packages/volto/src/components/theme/Login/Login.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,10 @@ const Login = (props) => {
const token = useSelector((state) => state.userSession.token, shallowEqual);
const error = useSelector((state) => state.userSession.login.error);
const loading = useSelector((state) => state.userSession.login.loading);
const returnUrl = qs.parse(props.location?.search ?? location.search).return_url || location.pathname.replace(/\/[^/]*\/?$/, '') || '/';
const returnUrl =
qs.parse(props.location?.search ?? location.search).return_url ||
location.pathname.replace(/\/[^/]*\/?$/, '') ||
'/';
const previousToken = usePrevious(token);

useEffect(() => {
Expand Down

0 comments on commit 2fbcfcf

Please sign in to comment.