- Add error.tsx and loading.tsx boundaries for admin, parent, student, teacher routes - Add admin announcements edit, audit-logs overview, curriculum-map, invitation-codes, permissions, questions, roles routes - Add admin elective detail and components, files, course-plans, users, scheduling boundaries - Add messages group-compose route - Add parent course-plans, elective, grades report-card, practice routes - Add student course-plans, elective detail, error-book dialogs, grades report-card, learning study-path, leave, schedule boundaries - Add teacher attendance report, classes boundaries, course-plans boundaries, elective, exams analytics/edit-rich/all/create/new, grades report-card, homework boundaries, leave, lesson-plans calendar - Add auth loading, onboarding loading, api cron
42 lines
1.1 KiB
TypeScript
42 lines
1.1 KiB
TypeScript
"use client"
|
|
|
|
import { useEffect } from "react"
|
|
import { BarChart3 } from "lucide-react"
|
|
import { useTranslations } from "next-intl"
|
|
|
|
import { EmptyState } from "@/shared/components/ui/empty-state"
|
|
|
|
export default function TeacherPracticeError({
|
|
error,
|
|
reset,
|
|
}: {
|
|
error: Error & { digest?: string }
|
|
reset: () => void
|
|
}): React.ReactNode {
|
|
const t = useTranslations("practice")
|
|
useEffect(() => {
|
|
console.error("Practice analytics page error:", error)
|
|
}, [error])
|
|
|
|
return (
|
|
<div className="flex h-full flex-col space-y-8 p-8">
|
|
<div>
|
|
<h1 className="text-2xl font-bold tracking-tight">
|
|
{t("errors.pageErrorTitlePractice")}
|
|
</h1>
|
|
<p className="text-muted-foreground">{t("errors.pageErrorPractice")}</p>
|
|
</div>
|
|
<EmptyState
|
|
icon={BarChart3}
|
|
title={t("errors.loadFailed")}
|
|
description={t("errors.loadFailedDescription")}
|
|
action={{
|
|
label: t("errors.retry"),
|
|
onClick: () => reset(),
|
|
}}
|
|
className="h-[360px] bg-card"
|
|
/>
|
|
</div>
|
|
)
|
|
}
|