hoffentlich
This commit is contained in:
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user