Skip to content

Commit

Permalink
hotfix(con): after login, redirect to "goto" url (?goto=xxx)
Browse files Browse the repository at this point in the history
  • Loading branch information
ericbolikowski committed Jul 24, 2024
1 parent 9d3f534 commit b14d067
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion apps/redi-connect/src/pages/front/login/Login.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,9 @@ export default function Login() {
// TODO: insert proper error handling here and elsewhere. We should cover cases where we
// get values usch as myProfileResult.isError. Perhaps we-ure the error boundary logic
// that Eric has been looking into.
return history.push('/app/me')
const urlParams = new URLSearchParams(window.location.search)
const goto = urlParams.get('goto') ?? '/app/me'
return history.push(goto)
} catch (err) {
console.log(err)
}
Expand Down

0 comments on commit b14d067

Please sign in to comment.