feat: citizenship built

This commit is contained in:
Ivan Rezchikov
2026-07-03 15:03:35 +03:00
parent c60ab9e8f9
commit 2eb0de5357
46 changed files with 1150 additions and 257 deletions
+24
View File
@@ -0,0 +1,24 @@
import { PageMeta, PagePublic } from "@/lib/pages/types";
import { CalendarIcon, Globe2Icon } from "lucide-react";
import Link from "next/link";
import { Badge } from "./ui/badge";
import { formatDate } from "@/lib/utils";
export function NewsCard({ news }: { news: PagePublic }) {
return (
<div className="flex flex-col gap-2">
<Link href={`/news/${news.slug}`} className="w-max">
<h2 className="hover:underline underline-offset-8 decoration-2 hover:duration-200 cursor-pointer">{news.title}</h2>
</Link>
<div className="flex flex-row gap-8 items-center">
<p className="flex gap-2 items-center"><CalendarIcon size={16} />{formatDate(news.publishedAt)}</p>
{(news?.meta as PageMeta)?.location && <p className="flex gap-2 items-center"><Globe2Icon size={16} />{(news.meta as PageMeta)?.location}</p>}
<div className="flex flex-row gap-4">
{((news.meta as PageMeta)?.tags)?.map((tag) => (
<Badge key={tag}>{tag}</Badge>
))}
</div>
</div>
</div>
);
}