prod
This commit is contained in:
+18
-24
@@ -1,6 +1,4 @@
|
||||
import DraftsDialog from "@/components/drafts-dialog";
|
||||
import Footer from "@/components/footer";
|
||||
import Header from "@/components/header";
|
||||
import { NewsCard } from "@/components/news-card";
|
||||
import { Button } from "@/components/ui/button";
|
||||
import { getPages } from "@/lib/pages/repository";
|
||||
@@ -17,29 +15,25 @@ export default async function News() {
|
||||
const drafts = [...newsDrafts, ...pageDrafts];
|
||||
|
||||
return (
|
||||
<>
|
||||
<Header />
|
||||
<div className="flex flex-col p-16 gap-16">
|
||||
<div className="flex flex-row items-center justify-between">
|
||||
<h1>News</h1>
|
||||
<div className="flex flex-row items-center gap-4">
|
||||
{user?.isAdmin && (
|
||||
<div className="flex flex-row items-center gap-4">
|
||||
<DraftsDialog drafts={drafts} />
|
||||
<Link href="/create/"><Button variant="secondary">Create a new page</Button></Link>
|
||||
</div>
|
||||
)}
|
||||
</div>
|
||||
</div>
|
||||
<div className="flex flex-col gap-6">
|
||||
{
|
||||
news.length > 0 ? news.map((n) => (
|
||||
<NewsCard news={n} key={n.id} />
|
||||
)) : <h2 className="text-muted-foreground">There are no news yet...</h2>
|
||||
}
|
||||
<div className="flex flex-col p-4 md:p-16 gap-8 md:gap-16 mb-4 md:mb-0">
|
||||
<div className="flex flex-col gap-4 md:flex-row md:items-center justify-between">
|
||||
<h1>News</h1>
|
||||
<div className="flex flex-row items-center gap-4">
|
||||
{user?.isAdmin && (
|
||||
<div className="flex flex-row items-center gap-4">
|
||||
<DraftsDialog drafts={drafts} />
|
||||
<Link href="/create/"><Button variant="secondary">Create a new page</Button></Link>
|
||||
</div>
|
||||
)}
|
||||
</div>
|
||||
</div>
|
||||
<Footer />
|
||||
</>
|
||||
<div className="flex flex-col gap-6">
|
||||
{
|
||||
news.length > 0 ? news.map((n) => (
|
||||
<NewsCard news={n} key={n.id} />
|
||||
)) : <h2 className="text-muted-foreground">There are no news yet...</h2>
|
||||
}
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user