import type { Metadata } from "next"; import { getActivity } from "@/lib/activity"; import Link from "next/link"; export const metadata: Metadata = { title: "Aktivite" }; const typeIcons: Record = { post: "✍", notebook: "◎", infosec: "⚔", project: "◈", link: "⊞", update: "▲", system: "⚙", }; const typeLabels: Record = { post: "Blog", notebook: "Notebook", infosec: "Infosec", project: "Proje", link: "Link", update: "Güncelleme", system: "Sistem", }; export default function AktivitePage() { const activities = getActivity(); return (
Aktivite

Sitede olan her şeyin kaydı — changelog + activity stream

{activities.length === 0 ? (
Henüz aktivite yok
) : (
    {activities.map((a) => (
  • {formatDateTime(a.timestamp)} {typeIcons[a.type] || "▶"} {typeLabels[a.type] || a.type} {a.link ? ( {a.message} ) : ( {a.message} )}
  • ))}
)}
); } function formatDateTime(iso: string) { const d = new Date(iso); return d.toLocaleString("tr-TR", { year: "numeric", month: "2-digit", day: "2-digit", hour: "2-digit", minute: "2-digit", }); }