feat: Add Next.js basePath and relocate the login page to /login.
This commit is contained in:
@@ -2,7 +2,7 @@ import mintelNextConfig from "@mintel/next-config";
|
|||||||
import { NextConfig } from "next";
|
import { NextConfig } from "next";
|
||||||
|
|
||||||
const nextConfig: NextConfig = {
|
const nextConfig: NextConfig = {
|
||||||
// Gatekeeper specific overrides
|
basePath: "/gatekeeper",
|
||||||
};
|
};
|
||||||
|
|
||||||
export default mintelNextConfig(nextConfig);
|
export default mintelNextConfig(nextConfig);
|
||||||
|
|||||||
@@ -34,9 +34,7 @@ export default async function LoginPage({ searchParams }: LoginPageProps) {
|
|||||||
});
|
});
|
||||||
redirect(targetRedirect);
|
redirect(targetRedirect);
|
||||||
} else {
|
} else {
|
||||||
redirect(
|
redirect(`/login?error=1&redirect=${encodeURIComponent(targetRedirect)}`);
|
||||||
`/gatekeeper/login?error=1&redirect=${encodeURIComponent(targetRedirect)}`,
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -57,7 +55,7 @@ export default async function LoginPage({ searchParams }: LoginPageProps) {
|
|||||||
<div className="flex justify-center">
|
<div className="flex justify-center">
|
||||||
<div className="w-16 h-16 bg-black rounded-xl flex items-center justify-center shadow-xl shadow-slate-100 hover:scale-105 transition-all duration-500 ease-[cubic-bezier(0.23,1,0.32,1)] rotate-2 hover:rotate-0">
|
<div className="w-16 h-16 bg-black rounded-xl flex items-center justify-center shadow-xl shadow-slate-100 hover:scale-105 transition-all duration-500 ease-[cubic-bezier(0.23,1,0.32,1)] rotate-2 hover:rotate-0">
|
||||||
<Image
|
<Image
|
||||||
src="/icon-white.svg"
|
src="/gatekeeper/icon-white.svg"
|
||||||
alt="Mintel"
|
alt="Mintel"
|
||||||
width={32}
|
width={32}
|
||||||
height={32}
|
height={32}
|
||||||
@@ -114,7 +112,7 @@ export default async function LoginPage({ searchParams }: LoginPageProps) {
|
|||||||
<div className="h-px w-8 bg-slate-100" />
|
<div className="h-px w-8 bg-slate-100" />
|
||||||
<div className="opacity-80 transition-opacity hover:opacity-100">
|
<div className="opacity-80 transition-opacity hover:opacity-100">
|
||||||
<Image
|
<Image
|
||||||
src="/logo-black.svg"
|
src="/gatekeeper/logo-black.svg"
|
||||||
alt={projectName}
|
alt={projectName}
|
||||||
width={140}
|
width={140}
|
||||||
height={40}
|
height={40}
|
||||||
@@ -1,5 +1,5 @@
|
|||||||
import { redirect } from "next/navigation";
|
import { redirect } from "next/navigation";
|
||||||
|
|
||||||
export default function RootPage() {
|
export default function RootPage() {
|
||||||
redirect("/gatekeeper/login");
|
redirect("/login");
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user