add: Layout, working permissions for papers
This commit is contained in:
35
src/app/(frontend)/diplomarbeit/[id]/page.tsx
Normal file
35
src/app/(frontend)/diplomarbeit/[id]/page.tsx
Normal file
@@ -0,0 +1,35 @@
|
||||
import { getPayload } from 'payload';
|
||||
import config from '@payload-config';
|
||||
import Link from "next/link"
|
||||
|
||||
export default async function Page({
|
||||
params,
|
||||
}: {
|
||||
params: Promise<{ id: number }>
|
||||
}) {
|
||||
const { id } = await params
|
||||
|
||||
|
||||
const payload = await getPayload({ config });
|
||||
|
||||
|
||||
const result = await payload.findByID({
|
||||
collection: 'papers', // required
|
||||
id: id, // required
|
||||
})
|
||||
|
||||
|
||||
return (
|
||||
<div className="w-2/3 mx-auto">
|
||||
<Link href="/">{"<-"} Back</Link>
|
||||
<h4 className="text-lg text-gray-600">Diplom- und Abschlussarbeiten ({result.year})</h4>
|
||||
<h1 className="text-4xl font-semibold">{result.title}</h1>
|
||||
<h2 className="text-3xl">Zielsetzung</h2>
|
||||
<p className="text-lg">{result.goal}</p>
|
||||
<h2 className="text-3xl">Problemstellung</h2>
|
||||
<p className="text-lg">{result.issue}</p>
|
||||
<h2 className="text-3xl">Ergebnisse</h2>
|
||||
<p className="text-lg">{result.result}</p>
|
||||
</div>
|
||||
)
|
||||
}
|
||||
Reference in New Issue
Block a user