import { prisma } from "@/core/db/prisma"; import { verifySession } from "@/core/security/session"; import { Link, redirect } from "@/i18n/routing"; import { getLocale } from "next-intl/server"; import { Plus, Pencil, ArrowLeft, Code2 } from "lucide-react"; import { DeleteSkillButton } from "@/features/skills/delete-skill-button"; import { SkillIcon } from "@/features/skills/skill-icon"; const CATEGORY_LABELS: Record = { backend: "Enterprise Backend", infra: "Database & Infra", frontend: "Frontend", mobile: "Mobile", }; const CATEGORY_COLORS: Record = { backend: "text-blue-500 bg-blue-500/10", infra: "text-emerald-500 bg-emerald-500/10", frontend: "text-violet-500 bg-violet-500/10", mobile: "text-orange-500 bg-orange-500/10", }; export default async function AdminSkillsPage() { const session = await verifySession(); const locale = await getLocale(); if (!session) { redirect({ href: "/admin/login", locale }); } const skills = await prisma.skill.findMany({ orderBy: [{ category: "asc" }, { name: "asc" }], }); return (

Tech Stack

Manage your skills and technology arsenal.

Add Skill
{skills.length === 0 ? (

No skills yet

Start adding your tech stack.

Add First Skill
) : (
{skills.map((skill) => (

{skill.name}

{CATEGORY_LABELS[skill.category] ?? skill.category}
))}
)}
); }