feat(app): add lesson-plans, practice, and grade dashboard routes
- Add admin/lesson-plans, parent/lesson-plans, student/lesson-plans routes - Add student/practice and teacher/practice routes for adaptive practice - Add management/grade/dashboard and management/grade/practice routes - Add teacher/lesson-plans error and loading boundaries - Update existing admin, parent, student, teacher pages with new features - Update globals.css and proxy middleware
This commit is contained in:
32
src/app/(dashboard)/student/practice/[sessionId]/error.tsx
Normal file
32
src/app/(dashboard)/student/practice/[sessionId]/error.tsx
Normal file
@@ -0,0 +1,32 @@
|
||||
"use client"
|
||||
|
||||
import { useEffect } from "react"
|
||||
import Link from "next/link"
|
||||
import { useTranslations } from "next-intl"
|
||||
import { Button } from "@/shared/components/ui/button"
|
||||
|
||||
export default function PracticeSessionError({
|
||||
error,
|
||||
reset,
|
||||
}: {
|
||||
error: Error & { digest?: string }
|
||||
reset: () => void
|
||||
}): React.ReactNode {
|
||||
const t = useTranslations("student")
|
||||
useEffect(() => {
|
||||
console.error("Practice session error:", error)
|
||||
}, [error])
|
||||
|
||||
return (
|
||||
<div className="flex h-full flex-col items-center justify-center space-y-4 p-8">
|
||||
<h2 className="text-xl font-semibold">{t("error.title")}</h2>
|
||||
<p className="text-sm text-muted-foreground">{error.message}</p>
|
||||
<div className="flex gap-2">
|
||||
<Button onClick={reset}>{t("error.retry")}</Button>
|
||||
<Button variant="outline" asChild>
|
||||
<Link href="/student/practice">{t("classDetail.backToCourses")}</Link>
|
||||
</Button>
|
||||
</div>
|
||||
</div>
|
||||
)
|
||||
}
|
||||
Reference in New Issue
Block a user