[portal][feat] allow customization of login redirect

pull/498/head
Tay Yang Shun 2 years ago
parent 960ffdc8dc
commit e7431867c2

@ -1,8 +1,11 @@
export default function loginPageHref() {
export default function loginPageHref(redirectUrl?: string) {
return {
pathname: '/login',
query: {
redirect: typeof window !== 'undefined' ? window.location.href : null,
redirect:
typeof window !== 'undefined'
? redirectUrl ?? window.location.href
: null,
},
};
}

Loading…
Cancel
Save