hoffentlich

This commit is contained in:
2026-02-28 18:45:45 +01:00
parent 02bb2ed994
commit 35c23164bf
8 changed files with 44 additions and 25 deletions

View File

@@ -30,8 +30,8 @@ export default async function NewsPage() {
orderBy: [{ publishedAt: 'desc' }, { createdAt: 'desc' }],
})
const published = news.filter((n) => n.publishedAt)
const drafts = news.filter((n) => !n.publishedAt)
const published = news.filter((n: typeof news[number]) => n.publishedAt)
const drafts = news.filter((n: typeof news[number]) => !n.publishedAt)
return (
<div className="space-y-6">
@@ -56,7 +56,7 @@ export default async function NewsPage() {
<div className="bg-white rounded-lg border overflow-hidden">
<table className="w-full data-table">
<tbody>
{drafts.map((n) => (
{drafts.map((n: typeof drafts[number]) => (
<tr key={n.id}>
<td className="w-full">
<p className="font-medium text-gray-900">{n.title}</p>
@@ -96,7 +96,7 @@ export default async function NewsPage() {
</tr>
</thead>
<tbody>
{published.map((n) => (
{published.map((n: typeof published[number]) => (
<tr key={n.id}>
<td className="font-medium text-gray-900">{n.title}</td>
<td>