Archived
Public pages, auth, registration, payment, My Events and the kiosk: skip link, focus ring, labels tied to fields, named quantity buttons, announced errors, ModalOverlay popups (focus trap, Escape, focus return), contrast and underlined in-text links, reduced motion. Branding warns about a primary colour too light for white text and offers a darker shade. axe-core and keyboard checks in e2e/accessibility.spec.ts. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
104 lines
4.5 KiB
TypeScript
104 lines
4.5 KiB
TypeScript
"use client";
|
|
|
|
import Link from "next/link";
|
|
import { Mail, Phone, MapPin, ShieldCheck } from "lucide-react";
|
|
import { Navbar } from "@/components/layout/Navbar";
|
|
import { Footer } from "@/components/layout/Footer";
|
|
import { useSiteSettings } from "@/contexts/SiteSettingsContext";
|
|
import { appName } from "@/lib/siteConfig";
|
|
import { LocationMap } from "@/components/events/LocationMap";
|
|
|
|
export default function ContactPage() {
|
|
const { settings, loading } = useSiteSettings();
|
|
const orgName = settings.org_name || appName;
|
|
const email = settings.org_email || "";
|
|
const phone = settings.org_phone || "";
|
|
const address = settings.org_address || "";
|
|
const ioName = settings.legal_io_name || "";
|
|
const ioEmail = settings.legal_io_email || "";
|
|
const hasAny = !!(email || phone || address);
|
|
|
|
return (
|
|
<div className="min-h-screen flex flex-col">
|
|
<Navbar />
|
|
<main className="flex-1 py-12 px-4 max-w-3xl mx-auto w-full">
|
|
<div className="text-center mb-10">
|
|
<h1 className="text-3xl font-bold text-gray-900">Contact {orgName}</h1>
|
|
<p className="text-gray-600 mt-2">We'd love to hear from you — reach out any of the ways below.</p>
|
|
</div>
|
|
|
|
{!loading && !hasAny && (
|
|
<p className="text-center text-sm text-gray-500">Contact details haven't been set up yet.</p>
|
|
)}
|
|
|
|
<div className="grid gap-4 sm:grid-cols-3">
|
|
{email && (
|
|
<a
|
|
href={`mailto:${email}`}
|
|
className="flex flex-col items-center text-center gap-3 rounded-xl border border-gray-200 bg-white p-6 shadow-sm hover:border-brand-200 hover:shadow transition-shadow"
|
|
>
|
|
<div className="w-12 h-12 rounded-full bg-brand-50 flex items-center justify-center">
|
|
<Mail className="w-6 h-6 text-brand-600" />
|
|
</div>
|
|
<div>
|
|
<div className="text-sm font-semibold text-gray-900">Email</div>
|
|
<div className="text-sm text-gray-600 break-all">{email}</div>
|
|
</div>
|
|
</a>
|
|
)}
|
|
{phone && (
|
|
<a
|
|
href={`tel:${phone}`}
|
|
className="flex flex-col items-center text-center gap-3 rounded-xl border border-gray-200 bg-white p-6 shadow-sm hover:border-brand-200 hover:shadow transition-shadow"
|
|
>
|
|
<div className="w-12 h-12 rounded-full bg-brand-50 flex items-center justify-center">
|
|
<Phone className="w-6 h-6 text-brand-600" />
|
|
</div>
|
|
<div>
|
|
<div className="text-sm font-semibold text-gray-900">Phone</div>
|
|
<div className="text-sm text-gray-600">{phone}</div>
|
|
</div>
|
|
</a>
|
|
)}
|
|
{address && (
|
|
<div className="flex flex-col items-center text-center gap-3 rounded-xl border border-gray-200 bg-white p-6 shadow-sm">
|
|
<div className="w-12 h-12 rounded-full bg-brand-50 flex items-center justify-center">
|
|
<MapPin className="w-6 h-6 text-brand-600" />
|
|
</div>
|
|
<div>
|
|
<div className="text-sm font-semibold text-gray-900">Address</div>
|
|
<div className="text-sm text-gray-600">{address}</div>
|
|
</div>
|
|
</div>
|
|
)}
|
|
</div>
|
|
|
|
{address && (
|
|
<div className="mt-8 border rounded-xl p-5 bg-white shadow-sm">
|
|
<LocationMap address={address} />
|
|
</div>
|
|
)}
|
|
|
|
{/* POPIA: the Information Officer, once one is set in Site Settings → Legal. */}
|
|
{ioName && (
|
|
<div className="mt-8 flex items-start gap-3 border rounded-xl p-5 bg-white shadow-sm">
|
|
<div className="w-10 h-10 rounded-full bg-brand-50 flex items-center justify-center shrink-0">
|
|
<ShieldCheck className="w-5 h-5 text-brand-600" />
|
|
</div>
|
|
<div className="text-sm text-gray-600">
|
|
<div className="font-semibold text-gray-900">Privacy and your personal information</div>
|
|
<p className="mt-1">
|
|
Our Information Officer is <strong>{ioName}</strong>
|
|
{ioEmail && <> — <a href={`mailto:${ioEmail}`} className="text-brand-600 hover:underline break-all">{ioEmail}</a></>}.
|
|
Contact them about the information we hold about you, or see our{" "}
|
|
<Link href="/legal/privacy" className="text-brand-600 hover:underline">privacy notice</Link>.
|
|
</p>
|
|
</div>
|
|
</div>
|
|
)}
|
|
</main>
|
|
<Footer />
|
|
</div>
|
|
);
|
|
}
|