5d38312ef0
- New standalone Next.js marketing site under site/ (static export, SEO): landing, download/install guide (Bazaar/Myket/iOS-PWA/web), FAQ (JSON-LD), privacy, terms, support, /admin link editor. fa RTL, sitemap/robots/manifest. - Backend: SiteLinksService (JSON-file persisted) + GET /api/site/links (public) + POST /api/admin/site/links (X-Admin-Token). ADMIN_TOKEN + Site__DataDir via env. - compose: hokm-site service (:1520) + hokm_data volume for links JSON. - CI deploy job builds + deploys the site container. - deploy/SUBDOMAIN_SPLIT.md: nginx blocks, cert reissue, DNS, ENV split. - Exclude site/ from root tsc + web docker context. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
42 lines
1.5 KiB
TypeScript
42 lines
1.5 KiB
TypeScript
"use client";
|
||
|
||
import { useEffect, useState } from "react";
|
||
import { Mail, Phone, Send } from "lucide-react";
|
||
import { fetchLinks, FALLBACK_LINKS, type SiteLinks } from "@/lib/links";
|
||
|
||
export function SupportContact() {
|
||
const [links, setLinks] = useState<SiteLinks>(FALLBACK_LINKS);
|
||
useEffect(() => {
|
||
let on = true;
|
||
fetchLinks().then((l) => on && setLinks(l));
|
||
return () => {
|
||
on = false;
|
||
};
|
||
}, []);
|
||
|
||
const email = links.supportEmail || FALLBACK_LINKS.supportEmail;
|
||
|
||
return (
|
||
<div className="grid gap-3 sm:grid-cols-2">
|
||
<a href={`mailto:${email}`} className="glass flex items-center gap-3 rounded-2xl p-5 hover:border-gold/40">
|
||
<Mail className="text-gold" /> <span>{email}</span>
|
||
</a>
|
||
{links.supportPhone && (
|
||
<a href={`tel:${links.supportPhone}`} className="glass flex items-center gap-3 rounded-2xl p-5 hover:border-gold/40">
|
||
<Phone className="text-gold" /> <span dir="ltr">{links.supportPhone}</span>
|
||
</a>
|
||
)}
|
||
{links.telegram && (
|
||
<a href={links.telegram} target="_blank" rel="noopener" className="glass flex items-center gap-3 rounded-2xl p-5 hover:border-gold/40">
|
||
<Send className="text-teal" /> <span>تلگرام پشتیبانی</span>
|
||
</a>
|
||
)}
|
||
{links.instagram && (
|
||
<a href={links.instagram} target="_blank" rel="noopener" className="glass flex items-center gap-3 rounded-2xl p-5 hover:border-gold/40">
|
||
<span className="text-lg">📷</span> <span>اینستاگرام</span>
|
||
</a>
|
||
)}
|
||
</div>
|
||
);
|
||
}
|