mirror of
https://github.com/yangshun/tech-interview-handbook.git
synced 2026-03-31 09:31:58 +08:00
[portal][feat] allow customization of login redirect
This commit is contained in:
@@ -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,
|
||||
},
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user