-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
f449384
commit 3e732a7
Showing
57 changed files
with
2,517 additions
and
2,631 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,43 +1,45 @@ | ||
import { Card, CardContent, CardHeader, CardTitle } from "@/components/ui/card"; | ||
import Image from "next/image"; | ||
import { Alert, AlertDescription, AlertTitle } from "@/components/ui/alert"; | ||
import { ShieldAlert } from "lucide-react"; | ||
import { TriangleAlert } from "lucide-react"; | ||
import { Button } from "@/components/ui/button"; | ||
import Link from "next/link"; | ||
export default async function Page({ | ||
searchParams, | ||
}: { | ||
searchParams: { error: string }; | ||
|
||
export default async function Page(props: { | ||
searchParams: Promise<{ error: string }>; | ||
}) { | ||
const searchParams = await props.searchParams; | ||
const { error } = searchParams; | ||
return ( | ||
<Card className="mx-auto w-[45vw] mt-24"> | ||
<CardHeader> | ||
<CardTitle className="text-2xl flex justify-center"> | ||
<Image src={"/logo.png"} height={125} width={125} alt="logo" /> | ||
</CardTitle> | ||
</CardHeader> | ||
<CardContent> | ||
<form> | ||
<div className="grid gap-4"> | ||
<div className="grid gap-2"> | ||
<Alert variant={"destructive"}> | ||
<AlertTitle className={"rounded-md flex justify-center"}> | ||
<ShieldAlert size={60} /> | ||
</AlertTitle> | ||
<AlertDescription className={"mt-3 flex justify-center"}> | ||
<span className={"text-md"}> | ||
{error || "something went wrong"} | ||
</span> | ||
</AlertDescription> | ||
</Alert> | ||
<Button asChild variant={"outline"}> | ||
<Link href="/auth/login">Login Again</Link> | ||
</Button> | ||
<div className="h-screen w-full flex justify-center items-center"> | ||
<Card className="mx-auto w-full max-w-md"> | ||
<CardHeader> | ||
<CardTitle className="text-2xl flex justify-center"> | ||
<Image src={"/logo.png"} height={125} width={125} alt="logo" /> | ||
</CardTitle> | ||
</CardHeader> | ||
<CardContent> | ||
<form > | ||
<div className="grid gap-4"> | ||
<div className="grid gap-2"> | ||
<Alert variant={"destructive"}> | ||
<AlertTitle className={"rounded-md flex justify-center"}> | ||
<TriangleAlert size={60} /> | ||
</AlertTitle> | ||
<AlertDescription className={"mt-3 flex justify-center"}> | ||
<span className={"text-md"}> | ||
{error || "something went wrong"} | ||
</span> | ||
</AlertDescription> | ||
</Alert> | ||
<Button asChild variant={"outline"}> | ||
<Link href="/auth/login">Login Again</Link> | ||
</Button> | ||
</div> | ||
</div> | ||
</div> | ||
</form> | ||
</CardContent> | ||
</Card> | ||
</form> | ||
</CardContent> | ||
</Card> | ||
</div> | ||
); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,19 @@ | ||
import { NewPasswordFrom } from "@/components/auth/new-password-form"; | ||
|
||
import { Metadata } from "next"; | ||
|
||
export const metadata: Metadata = { | ||
title: "New Password", | ||
description: "Reset Password Page - Next Auth Example" | ||
} | ||
export default function Page({ params }: { params: { token: string } }) { | ||
const { token } = params | ||
title: "New Password", | ||
description: "Reset Password Page - Next Auth Example", | ||
}; | ||
export default async function Page(props: { | ||
params: Promise<{ token: string }>; | ||
}) { | ||
const params = await props.params; | ||
const { token } = params; | ||
|
||
return (<div className=" flex justify-center flex-col mt-20"> | ||
<NewPasswordFrom token={token} /> | ||
</div>) | ||
return ( | ||
<div className=" flex h-screen justify-center flex-col w-full items-center"> | ||
<NewPasswordFrom token={token} /> | ||
</div> | ||
); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,17 @@ | ||
import {Card, CardContent, CardHeader, CardTitle} from "@/components/ui/card"; | ||
import {auth} from "@/app/auth"; | ||
import { Card, CardContent, CardHeader, CardTitle } from "@/components/ui/card"; | ||
import { auth } from "@/app/auth"; | ||
export default async function Page() { | ||
const session=await auth() | ||
return <div className={" mt-10 flex justify-center"}> | ||
<Card className={ "w-[43vw] flex-col"}> | ||
<CardHeader> | ||
<CardTitle className={"flex justify-center"}>Your Session</CardTitle> | ||
</CardHeader> | ||
<CardContent> | ||
<pre>{JSON.stringify(session,null,2)}</pre> | ||
</CardContent> | ||
</Card> | ||
const session = await auth(); | ||
return ( | ||
<div className={" mt-10 flex justify-center"}> | ||
<Card className={"w-full max-w-xl flex-col"}> | ||
<CardHeader> | ||
<CardTitle className={"flex justify-center"}>Your Session</CardTitle> | ||
</CardHeader> | ||
<CardContent> | ||
<pre >{JSON.stringify(session, null, 2)}</pre> | ||
</CardContent> | ||
</Card> | ||
</div> | ||
} | ||
); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.