Files
rk-frontend/src/app/(pages)/rk2/visu-aggregate/[componentId]/grafiken/page.tsx
T
2026-10-22 07:57:57 +02:00

19 lines
906 B
TypeScript
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
import Link from 'next/link';
import { api_viewAggregate } from '@/actions/rk2/api-procon-view-aggregate';
import ViewAggregateForm from '@/components/rk2/visu-aggregate/viewAggregateForm';
export default async function Page({ params }: { params: Promise<{ componentId: string }> }) {
const { componentId } = await params;
try {
const data = await api_viewAggregate(componentId);
return <div><Link href="/rk2/visu-aggregate" className="underline">Zurück zu VisuAggregate</Link>
<h1 className="my-4 text-xl font-semibold">Grafiken – {data.name}</h1>
<ViewAggregateForm componentId={componentId} initial={data} />
</div>;
} catch (error) {
return <div><Link href="/rk2/visu-aggregate" className="underline">Zurück zur Tabelle</Link>
<p role="alert" className="mt-4 text-red-600">{error instanceof Error ? error.message : 'Laden fehlgeschlagen'}</p></div>;
}
}