import { A, useParams } from '@solidjs/router'; import { getArticleBySlug } from '~/lib/help-center'; import PublicHeader from '~/components/PublicHeader'; function categoryTitle(input: string) { return input .split('-') .filter(Boolean) .map((chunk) => chunk[0].toUpperCase() + chunk.slice(1)) .join(' '); } export default function HelpCenterArticlePage() { const params = useParams(); const article = getArticleBySlug(params.slug || ''); if (!article) { return ( Article not found The requested Help Center article is unavailable. Back to Help Center ); } return ( {categoryTitle(article.categoryKey)} {article.title} {article.summary} {article.tags.map((tag) => {tag})} Updated {new Date(article.updatedAt).toLocaleDateString()} {article.content} Back to Help Center Get Started Need more help? If this article does not solve your issue, send your question with context to support. Email support Browse more articles ); }
The requested Help Center article is unavailable.
{categoryTitle(article.categoryKey)}
{article.summary}
Updated {new Date(article.updatedAt).toLocaleDateString()}
{article.content}
If this article does not solve your issue, send your question with context to support.