Add Sonner-based notifications and UX polish
This commit is contained in:
@@ -5,7 +5,6 @@ import { getTranslations } from "next-intl/server";
|
||||
import { Container } from "@/components/layout/container";
|
||||
import { PageHero } from "@/components/layout/page-hero";
|
||||
import { MotionFade } from "@/components/motion-fade";
|
||||
import { FlashMessage } from "@/components/root/flash-message";
|
||||
import { ContactForm } from "@/components/site/contact-form";
|
||||
import { buildLocalizedMetadata } from "@/lib/metadata";
|
||||
import { getPublicContactProtectionSettings } from "@/lib/app-config";
|
||||
@@ -19,9 +18,6 @@ type ContactPageProps = {
|
||||
params: {
|
||||
locale: string;
|
||||
};
|
||||
searchParams?: {
|
||||
error?: string;
|
||||
};
|
||||
};
|
||||
|
||||
export async function generateMetadata({
|
||||
@@ -38,10 +34,7 @@ export async function generateMetadata({
|
||||
});
|
||||
}
|
||||
|
||||
export default async function ContactPage({
|
||||
params: { locale },
|
||||
searchParams,
|
||||
}: ContactPageProps) {
|
||||
export default async function ContactPage({ params: { locale } }: ContactPageProps) {
|
||||
const localeKey = resolveLocale(locale);
|
||||
const [t, protection] = await Promise.all([
|
||||
getTranslations({ locale: localeKey, namespace: "contactPage" }),
|
||||
@@ -86,11 +79,6 @@ export default async function ContactPage({
|
||||
<MotionFade delay={0.05}>
|
||||
<AppCard>
|
||||
<CardContent className="pt-6">
|
||||
{searchParams?.error ? (
|
||||
<div className="mb-4">
|
||||
<FlashMessage type="error" message={searchParams.error} />
|
||||
</div>
|
||||
) : null}
|
||||
<ContactForm
|
||||
action={submitContactFormAction}
|
||||
locale={localeKey}
|
||||
|
||||
Reference in New Issue
Block a user