1. Performance: 25 pages switched from force-dynamic to revalidate=300 (ISR); 2 pages (community, developers) now fully static (SSG) 2. DB indexes: Added @@index on foreign keys for WebsiteArticles, WebsiteArticleReactions, WebsiteArticleComments, WebsiteHelpCenterTickets, WebsiteShopArticles, RadioSongRequests, StaffActivities 3. SEO: Added robots.ts, sitemap.ts, canonical URLs, Open Graph + Twitter Card metadata on root layout and news articles 4. A11Y: Replaced <details>/<summary> dropdowns with accessible button-based NavDropdown (aria-expanded, aria-haspopup, role=menu). MobileNav now uses translated aria-label, aria-expanded, aria-controls, role=menu 5. Code quality: Added try/catch to updateArticle/deleteArticle; deleteArticle now uses prisma. for atomicity 6. CI/CD: Added GitHub Actions workflow (typecheck + test) 7. i18n: Added openMenu/closeMenu keys to all 6 locales 8. Observability: Health endpoint now checks SMTP reachability when configured 9. Loading states: Added loading.tsx for root, admin, and news sections 10. Word filter cache: Added 60s TTL auto-refresh instead of manual cache bust
43 lines
1.8 KiB
TypeScript
43 lines
1.8 KiB
TypeScript
import { getTranslations } from "next-intl/server";
|
|
import { siteSettings } from "@/lib/services/site-settings";
|
|
import { RegisterForm } from "@/components/auth/register-form";
|
|
import { captchaConfig } from "@/lib/services/captcha";
|
|
|
|
export const revalidate = 300;
|
|
|
|
export default async function RegisterPage({
|
|
searchParams,
|
|
}: {
|
|
searchParams: Promise<{ error?: string }>;
|
|
}) {
|
|
const t = await getTranslations("pages.register");
|
|
const { error } = await searchParams;
|
|
|
|
const [hotelName, imager, captcha, femaleFigures, maleFigures] = await Promise.all([
|
|
siteSettings.get("hotel_name", "Atom"),
|
|
siteSettings.get("habbo_imaging_url", "https://www.habbo.com/habbo-imaging/avatarimage"),
|
|
captchaConfig(),
|
|
siteSettings.get("register_female_figures", "hr-100-45.hd-180-1.ch-215-62.lg-270-62.sh-290-62,hr-130-45.hd-180-2.ch-220-62.lg-280-62.sh-305-62,hr-140-45.hd-180-3.ch-225-62.lg-270-62.sh-310-62,hr-165-45.hd-180-1.ch-210-62.lg-270-62.sh-290-62,hr-190-45.hd-180-2.ch-215-62.lg-270-62.sh-305-62"),
|
|
siteSettings.get("register_male_figures", "hr-100-61.hd-180-1.ch-210-66.lg-270-110.sh-305-62,hr-105-61.hd-190-2.ch-215-66.lg-280-110.sh-310-62,hr-110-61.hd-200-3.ch-220-66.lg-290-110.sh-320-62,hr-115-61.hd-185-1.ch-210-66.lg-275-110.sh-315-62,hr-120-61.hd-180-2.ch-205-66.lg-285-110.sh-305-62"),
|
|
]);
|
|
|
|
const allFigures = [
|
|
...(femaleFigures?.split(",").filter(Boolean) || []),
|
|
...(maleFigures?.split(",").filter(Boolean) || []),
|
|
];
|
|
|
|
return (
|
|
<main className="flex min-h-[calc(100vh-200px)] items-center justify-center px-4 py-8">
|
|
<div className="w-full">
|
|
<h1 className="sr-only">{t("title")}</h1>
|
|
<RegisterForm
|
|
initialFigures={allFigures}
|
|
imager={imager ?? ""}
|
|
hotelName={hotelName ?? "Atom"}
|
|
captcha={captcha}
|
|
error={error}
|
|
/>
|
|
</div>
|
|
</main>
|
|
);
|
|
} |