NORY-9: fix return to handling (#23)
This commit is contained in:
commit
90d11ae558
5 changed files with 23 additions and 9 deletions
|
@ -144,9 +144,11 @@ export default function Login() {
|
|||
<div className="flex flex-col">
|
||||
{
|
||||
flow ?
|
||||
<Button variant="link" asChild>
|
||||
<Link href="/flow/recovery" className="text-orange-600" passHref>
|
||||
<span>Forgot your password?</span>
|
||||
<Button variant="link" asChild><Link
|
||||
href={{ pathname: '/flow/recovery', query: { return_to: flow.return_to } }}
|
||||
className="text-orange-600"
|
||||
passHref>
|
||||
Forgot your password?
|
||||
</Link>
|
||||
</Button>
|
||||
:
|
||||
|
@ -155,8 +157,11 @@ export default function Login() {
|
|||
{
|
||||
flow ?
|
||||
<Button variant="link" asChild disabled={!flow}>
|
||||
<Link href="/flow/registration" className="inline-flex space-x-2" passHref>
|
||||
<span>Create an account</span>
|
||||
<Link
|
||||
href={{ pathname: '/flow/registration', query: { return_to: flow.return_to } }}
|
||||
className="inline-flex space-x-2"
|
||||
passHref>
|
||||
Create an account
|
||||
</Link>
|
||||
</Button>
|
||||
:
|
||||
|
|
|
@ -114,7 +114,10 @@ export default function Recovery() {
|
|||
{
|
||||
flow ?
|
||||
<Button variant="link" asChild disabled={!flow}>
|
||||
<Link href="/flow/login" className="inline-flex space-x-2" passHref>
|
||||
<Link
|
||||
href={{ pathname: '/flow/login', query: { return_to: flow.return_to } }}
|
||||
className="inline-flex space-x-2"
|
||||
passHref>
|
||||
Back to login
|
||||
</Link>
|
||||
</Button>
|
||||
|
|
|
@ -121,7 +121,10 @@ export default function Registration() {
|
|||
{
|
||||
flow ?
|
||||
<Button variant="link" asChild disabled={!flow}>
|
||||
<Link href="/flow/login" className="inline-flex space-x-2" passHref>
|
||||
<Link
|
||||
href={{ pathname: '/flow/login', query: { return_to: flow.return_to } }}
|
||||
className="inline-flex space-x-2"
|
||||
passHref>
|
||||
Log into your account
|
||||
</Link>
|
||||
</Button>
|
||||
|
|
|
@ -113,7 +113,10 @@ export default function Verification() {
|
|||
{
|
||||
flow ?
|
||||
<Button variant="link" asChild disabled={!flow}>
|
||||
<Link href="/flow/login" className="inline-flex space-x-2" passHref>
|
||||
<Link
|
||||
href={{ pathname: '/flow/login', query: { return_to: flow.return_to } }}
|
||||
className="inline-flex space-x-2"
|
||||
passHref>
|
||||
Back to login
|
||||
</Link>
|
||||
</Button>
|
||||
|
|
|
@ -41,5 +41,5 @@ export async function middleware(request: NextRequest) {
|
|||
}
|
||||
|
||||
export const config = {
|
||||
matcher: '/((?!api|_next/static|_next/image|favicon.png|sitemap.xml|robots.txt).*)',
|
||||
matcher: '/((?!api|_next/static|_next/image|favicon.png|sitemap.xml|robots.txt|sw.js).*)',
|
||||
};
|
||||
|
|
Loading…
Add table
Reference in a new issue