Module Update
This commit is contained in:
34
src/app/(auth)/error.tsx
Normal file
34
src/app/(auth)/error.tsx
Normal file
@@ -0,0 +1,34 @@
|
||||
"use client"
|
||||
|
||||
import { useEffect } from "react"
|
||||
import { Button } from "@/shared/components/ui/button"
|
||||
import { AlertCircle } from "lucide-react"
|
||||
|
||||
export default function AuthError({
|
||||
error,
|
||||
reset,
|
||||
}: {
|
||||
error: Error & { digest?: string }
|
||||
reset: () => void
|
||||
}) {
|
||||
useEffect(() => {
|
||||
console.error(error)
|
||||
}, [error])
|
||||
|
||||
return (
|
||||
<div className="flex h-full w-full flex-col items-center justify-center gap-4 p-4 text-center">
|
||||
<div className="flex h-16 w-16 items-center justify-center rounded-full bg-destructive/10">
|
||||
<AlertCircle className="h-8 w-8 text-destructive" />
|
||||
</div>
|
||||
<div className="space-y-2">
|
||||
<h2 className="text-xl font-bold tracking-tight">Authentication Error</h2>
|
||||
<p className="text-sm text-muted-foreground">
|
||||
There was a problem signing you in. Please try again.
|
||||
</p>
|
||||
</div>
|
||||
<Button onClick={() => reset()} variant="default" size="sm">
|
||||
Try again
|
||||
</Button>
|
||||
</div>
|
||||
)
|
||||
}
|
||||
5
src/app/(auth)/layout.tsx
Normal file
5
src/app/(auth)/layout.tsx
Normal file
@@ -0,0 +1,5 @@
|
||||
import { AuthLayout } from "@/modules/auth/components/auth-layout"
|
||||
|
||||
export default function Layout({ children }: { children: React.ReactNode }) {
|
||||
return <AuthLayout>{children}</AuthLayout>
|
||||
}
|
||||
11
src/app/(auth)/login/page.tsx
Normal file
11
src/app/(auth)/login/page.tsx
Normal file
@@ -0,0 +1,11 @@
|
||||
import { Metadata } from "next"
|
||||
import { LoginForm } from "@/modules/auth/components/login-form"
|
||||
|
||||
export const metadata: Metadata = {
|
||||
title: "Login - Next_Edu",
|
||||
description: "Login to your account",
|
||||
}
|
||||
|
||||
export default function LoginPage() {
|
||||
return <LoginForm />
|
||||
}
|
||||
22
src/app/(auth)/not-found.tsx
Normal file
22
src/app/(auth)/not-found.tsx
Normal file
@@ -0,0 +1,22 @@
|
||||
import Link from "next/link"
|
||||
import { Button } from "@/shared/components/ui/button"
|
||||
import { FileQuestion } from "lucide-react"
|
||||
|
||||
export default function AuthNotFound() {
|
||||
return (
|
||||
<div className="flex h-full w-full flex-col items-center justify-center gap-4 p-4 text-center">
|
||||
<div className="flex h-16 w-16 items-center justify-center rounded-full bg-muted">
|
||||
<FileQuestion className="h-8 w-8 text-muted-foreground" />
|
||||
</div>
|
||||
<div className="space-y-2">
|
||||
<h2 className="text-xl font-bold tracking-tight">Page Not Found</h2>
|
||||
<p className="text-sm text-muted-foreground">
|
||||
The authentication page you are looking for does not exist.
|
||||
</p>
|
||||
</div>
|
||||
<Button asChild variant="outline" size="sm">
|
||||
<Link href="/login">Return to Login</Link>
|
||||
</Button>
|
||||
</div>
|
||||
)
|
||||
}
|
||||
11
src/app/(auth)/register/page.tsx
Normal file
11
src/app/(auth)/register/page.tsx
Normal file
@@ -0,0 +1,11 @@
|
||||
import { Metadata } from "next"
|
||||
import { RegisterForm } from "@/modules/auth/components/register-form"
|
||||
|
||||
export const metadata: Metadata = {
|
||||
title: "Register - Next_Edu",
|
||||
description: "Create an account",
|
||||
}
|
||||
|
||||
export default function RegisterPage() {
|
||||
return <RegisterForm />
|
||||
}
|
||||
Reference in New Issue
Block a user