fix: 单页正文改用 post-detail-content 对齐帖子排版

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
2026-08-28 19:33:09 +08:00
parent 8cfe31da61
commit 4dc3bbb13f

View File

@@ -8,12 +8,14 @@ import PageLoader from '../components/PageLoader';
import { usePageSEO } from '../hooks/usePageSEO';
import { parsePermalinkSlug, pagePath } from '../utils/permalink';
import { useForumLimits } from '../hooks/useForumLimits';
import { useAuth } from '../hooks/useAuth';
/** 自定义单页(关于我们、版规等) */
export default function SitePageView() {
const { slug: rawSlug } = useParams();
const slug = parsePermalinkSlug(rawSlug);
const { limits } = useForumLimits();
const { user } = useAuth();
const [page, setPage] = useState<SitePage | null>(null);
const [loading, setLoading] = useState(true);
const [notFound, setNotFound] = useState(false);
@@ -48,7 +50,11 @@ export default function SitePageView() {
<header className="site-page__head">
<h1>{page.title}</h1>
</header>
<PostContent html={page.content} className="site-page__body post-body" />
<PostContent
html={page.content}
isLoggedIn={!!user}
className="site-page__body post-detail-content"
/>
</article>
</div>
);