انتقال تمام محتوای متنی سایت به دیتابیس — همه متن‌های فرانت‌اند از GET /api/site خوانده می‌شوند

This commit is contained in:
MMD
2026-09-06 20:16:17 +03:30
parent 8bb303dda2
commit 1fde4e30fc
36 changed files with 1096 additions and 454 deletions
+3 -3
View File
@@ -6,13 +6,13 @@ import { ButtonLink } from '../components/Button'
import { ProjectCard } from '../components/ProjectCard'
import { ContactSection } from '../components/ContactSection'
import { Lightbox } from '../components/Lightbox'
import { STATUS_LABEL } from '../data/site'
import { useSite } from '../api'
import { useSite, useStatusLabel } from '../api'
export function ProjectDetail() {
const { slug } = useParams<{ slug: string }>()
const { projects } = useSite()
const project = projects.find((p) => p.slug === slug)
const statusLabel = useStatusLabel(project?.status ?? '')
const [lightbox, setLightbox] = useState<number | null>(null)
if (!project) {
@@ -74,7 +74,7 @@ export function ProjectDetail() {
<Reveal className="order-1">
<span className="flex items-center gap-3 text-sm font-light text-copper">
<span aria-hidden="true" className="h-px w-8 bg-copper" />
{STATUS_LABEL[project.status]}
{statusLabel}
</span>
<h2 className="mt-4 text-3xl font-bold text-ivory">درباره پروژه</h2>