Module Update

This commit is contained in:
SpecialX
2025-12-30 14:42:30 +08:00
parent f1797265b2
commit e7c902e8e1
148 changed files with 19317 additions and 113 deletions

34
src/app/(auth)/error.tsx Normal file
View 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>
)
}

View 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>
}

View 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 />
}

View 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>
)
}

View 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 />
}