Skip to content

Commit 3020e41

Browse files
committed
Simplify redirect logic
1 parent da3aa97 commit 3020e41

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

demos/bookstore/app/auth.tsx

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,11 +19,8 @@ export default {
1919
login: {
2020
index({ session, url }) {
2121
let error = session.get('error')
22-
let returnTo = url.searchParams.get('returnTo') || routes.account.index.href()
23-
24-
// Build the form action URL with returnTo parameter
2522
let formAction = routes.auth.login.action.href(undefined, {
26-
returnTo: returnTo !== routes.account.index.href() ? returnTo : undefined,
23+
returnTo: url.searchParams.get('returnTo'),
2724
})
2825

2926
return render(

0 commit comments

Comments
 (0)