Reapply "Add missing admin action files and navigation links"

This reverts commit 4d515bc400.
This commit is contained in:
Simo committed 2026-07-11 20:52:56 +02:00
1 parent 96ed768f14
commit 5b4228261a
338 files changed
+28143 -5948

No files matched your search

+8 -10
View File
@@ -40,11 +40,7 @@ function formatDate(d: Date | null | undefined): string {
return d ? d.toISOString().slice(0, 10) : "";
}
export default async function ProfilePage({
params,
}: {
params: Promise<{ username: string }>;
}) {
export default async function ProfilePage({ params }: { params: Promise<{ username: string }> }) {
const t = await getTranslations("pages.profile");
const { username } = await params;
@@ -83,10 +79,8 @@ export default async function ProfilePage({
select: { type: true, amount: true },
})
.catch(() => []);
const ducketsAmount =
currencyRows.find((c) => c.type === CURRENCY_DUCKETS)?.amount ?? 0;
const diamondsAmount =
currencyRows.find((c) => c.type === CURRENCY_DIAMONDS)?.amount ?? 0;
const ducketsAmount = currencyRows.find((c) => c.type === CURRENCY_DUCKETS)?.amount ?? 0;
const diamondsAmount = currencyRows.find((c) => c.type === CURRENCY_DIAMONDS)?.amount ?? 0;
const wallet = [
{
key: "credits",
@@ -412,7 +406,11 @@ export default async function ProfilePage({
</ContentCard>
{/* ── Guestbook ───────────────────── */}
<ContentCard icon="📝" title={t("guestbookTitle")} subtitle={t("guestbookSubtitle", { username: user.username })}>
<ContentCard
icon="📝"
title={t("guestbookTitle")}
subtitle={t("guestbookSubtitle", { username: user.username })}
>
{isLoggedIn ? (
<form action={postGuestbook} className="card" style={{ marginBottom: "1rem" }}>
{/* Profile owner id drives the write target; the author is taken from