Add player bug reports and profile identity features

This commit is contained in:
2026-10-08 18:27:20 +05:00
parent 36e8d11eb4
commit 0b08672f4a
51 changed files with 3938 additions and 45 deletions

22
app/support/[id]/page.tsx Normal file
View File

@@ -0,0 +1,22 @@
import { notFound } from "next/navigation";
import { z } from "zod";
import { Header, Footer } from "@/components/Shell";
import { SupportConversation } from "@/components/Support";
export const metadata = { robots: { index: false, follow: false } };
export default async function Report({
params,
}: {
params: Promise<{ id: string }>;
}) {
const { id } = await params;
if (!z.string().uuid().safeParse(id).success) notFound();
return (
<>
<Header />
<main className="section page-content">
<SupportConversation key={id} id={id} />
</main>
<Footer />
</>
);
}

27
app/support/page.tsx Normal file
View File

@@ -0,0 +1,27 @@
import { Header, Footer } from "@/components/Shell";
import { SupportInbox } from "@/components/Support";
import { getI18n } from "@/lib/i18n";
export async function generateMetadata() {
const { t } = await getI18n();
return { title: t("Report a bug") };
}
export default async function Support({
searchParams,
}: {
searchParams: Promise<{ from?: string }>;
}) {
const query = await searchParams;
const pagePath =
query.from && /^\/(?!\/)[a-zA-Z0-9/_-]{0,299}$/.test(query.from)
? query.from
: "/";
return (
<>
<Header />
<main className="section page-content">
<SupportInbox pagePath={pagePath} />
</main>
<Footer />
</>
);
}