feat: full site build — Project/Melody schema (Option A), admin CRUD, public sections, uploads, email+SMTP, internal analytics, legal pages, docs
This commit is contained in:
@@ -1,8 +1,9 @@
|
||||
import type { Metadata } from "next";
|
||||
import { getActiveLocale, getDictionary, isLocale, type Locale } from "@/lib/i18n";
|
||||
import { buildPageMetadata } from "@/lib/metadata";
|
||||
import { getContactChannels, isComingSoonMode } from "@/lib/site";
|
||||
import { getContactChannels, isSiteClosedMode } from "@/lib/site";
|
||||
import { notFound, redirect } from "next/navigation";
|
||||
import ContactForm from "@/components/public/contact-form";
|
||||
|
||||
export function generateMetadata({ params }: { params: { locale: string } }): Metadata {
|
||||
if (!isLocale(params.locale)) {
|
||||
@@ -17,7 +18,7 @@ export default function ContactPage({ params }: { params: { locale: string } })
|
||||
notFound();
|
||||
}
|
||||
|
||||
if (isComingSoonMode()) {
|
||||
if (isSiteClosedMode()) {
|
||||
redirect("/");
|
||||
}
|
||||
|
||||
@@ -38,6 +39,20 @@ export default function ContactPage({ params }: { params: { locale: string } })
|
||||
<p>{dictionary.contact.availabilityDescription}</p>
|
||||
</article>
|
||||
|
||||
<ContactForm
|
||||
labels={{
|
||||
name: dictionary.contact.formName,
|
||||
email: dictionary.contact.formEmail,
|
||||
message: dictionary.contact.formMessage,
|
||||
submit: dictionary.contact.formSubmit,
|
||||
sending: dictionary.contact.formSending,
|
||||
success: dictionary.contact.formSuccess,
|
||||
savedWarning: dictionary.contact.formSavedWarning,
|
||||
invalid: dictionary.contact.formInvalid,
|
||||
rateLimit: dictionary.contact.formRateLimit,
|
||||
}}
|
||||
/>
|
||||
|
||||
<div className="section-heading">
|
||||
<h2>{dictionary.contact.channelsTitle}</h2>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user