umstellung auf claud
This commit is contained in:
1 parent
79c5f0c5cd
commit
5bb4e063da
171 files changed
+5471
-1333
No files matched your search
@@ -1,9 +1,9 @@
|
||||
import { api_anlage_getSelected } from '@/actions/rk/api-anlage';
|
||||
import { AnlagePdfViewer } from '@/components/rk/anlage/anlagePdfViewer';
|
||||
import { redirect } from 'next/navigation';
|
||||
|
||||
export default async function Page({ searchParams }: { searchParams: Promise<{ unit?: string }> }) {
|
||||
const anlage = await api_anlage_getSelected();
|
||||
if (!anlage?.id) return <p className="p-4">Bitte zuerst eine Anlage auswählen.</p>;
|
||||
const { unit } = await searchParams;
|
||||
return <AnlagePdfViewer key={anlage.id} anlage={anlage} initialUnitId={unit} />;
|
||||
export default async function PreviousPdfPage({ searchParams }: {
|
||||
searchParams: Promise<{ unit?: string }>;
|
||||
}) {
|
||||
const { unit } = await searchParams;
|
||||
const query = unit ? '?unit=' + encodeURIComponent(unit) : '';
|
||||
redirect('/anlagen/einstellungen/pdf' + query);
|
||||
}
|
||||
Reference in new issue
Block a user