Improve MineGeo exploration and mapping features
This commit is contained in:
32
app/log-in/page.tsx
Normal file
32
app/log-in/page.tsx
Normal file
@@ -0,0 +1,32 @@
|
||||
import { redirect } from "next/navigation";
|
||||
import { Header, Footer } from "@/components/Shell";
|
||||
import { SignIn } from "@/components/SignIn";
|
||||
import { user } from "@/lib/supabase";
|
||||
import { authDestination } from "@/shared/account";
|
||||
export const metadata = { title: "Log in" };
|
||||
export default async function LogIn({
|
||||
searchParams,
|
||||
}: {
|
||||
searchParams: Promise<{ next?: string; auth?: string }>;
|
||||
}) {
|
||||
const query = await searchParams;
|
||||
const next = authDestination(query.next);
|
||||
if (await user())
|
||||
redirect(next === "/auth/reset-password" ? "/settings" : next);
|
||||
return (
|
||||
<>
|
||||
<Header />
|
||||
<main className="section page-content auth-page">
|
||||
<SignIn
|
||||
next={next}
|
||||
initialError={
|
||||
query.auth === "failed"
|
||||
? "This sign-in link expired or could not be verified. Request a new link below."
|
||||
: ""
|
||||
}
|
||||
/>
|
||||
</main>
|
||||
<Footer />
|
||||
</>
|
||||
);
|
||||
}
|
||||
Reference in New Issue
Block a user