import { useEffect, useState } from 'react'; import { ExternalLink, Globe2 } from 'lucide-react'; import { Spinner } from '@/components/ui/spinner'; import { api } from '../api/client'; import type { CommunityShowcaseItem } from '../api/types'; import { joinSEOKeywords, usePageSEO } from '../hooks/usePageSEO'; import { getCachedSiteBranding, useSiteBranding } from '../hooks/useSiteBranding'; import { InFlowSiteFooter } from '../components/SiteFooter'; /** 官方精选的公网部署展柜(只读;仅人工精选条目) */ export default function ShowcasePage() { const { branding } = useSiteBranding(); const [items, setItems] = useState([]); const [loading, setLoading] = useState(true); usePageSEO({ title: '开源部署展柜', description: `${branding.name} 精选的姜十三论坛公网部署`, keywords: joinSEOKeywords('开源', '部署', '展柜', getCachedSiteBranding().keywords), canonicalPath: '/showcase', }); useEffect(() => { let cancelled = false; api.communityShowcase() .then((r) => { if (!cancelled) setItems(Array.isArray(r.items) ? r.items : []); }) .catch(() => { if (!cancelled) setItems([]); }) .finally(() => { if (!cancelled) setLoading(false); }); return () => { cancelled = true; }; }, []); return (

开源部署展柜

以下站点自愿开启社区上报,并由官方演示站精选推荐(非全量目录)

{loading ? (
) : items.length === 0 ? (

暂无精选实例

) : ( )}
); }