'use client' import { useState } from 'react' import Link from 'next/link' interface HelpTopic { slug: string title: string description: string icon: React.ReactNode articleCount: number } interface RecentArticle { slug: string category: string categorySlug: string title: string excerpt: string readTime: string } function SearchIcon() { return ( ) } function ExternalLinkIcon() { return ( ) } function ChevronRightIcon() { return ( ) } function MailIcon() { return ( ) } function DiscordIcon() { return ( ) } function GitHubIcon() { return ( ) } function StatusIcon() { return ( ) } const helpTopics: HelpTopic[] = [ { slug: 'getting-started', title: 'Getting Started', description: 'Create your account, set up your profile, and learn the basics.', articleCount: 8, icon: ( ), }, { slug: 'your-profile', title: 'Your Profile', description: 'Customize your profile, bio, avatar, and developer links.', articleCount: 6, icon: ( ), }, { slug: 'following-and-discovery', title: 'Following & Discovery', description: 'Find developers, follow projects, and grow your network.', articleCount: 5, icon: ( ), }, { slug: 'posts-and-snippets', title: 'Posts & Snippets', description: 'Share code snippets, updates, and developer content.', articleCount: 10, icon: ( ), }, { slug: 'repositories', title: 'Repositories', description: 'Link GitHub repos, claim ownership, and share your projects.', articleCount: 7, icon: ( ), }, { slug: 'reels', title: 'Reels', description: 'Create and watch short-form developer video content.', articleCount: 4, icon: ( ), }, { slug: 'notifications', title: 'Notifications', description: 'Manage alerts, mentions, and activity notifications.', articleCount: 5, icon: ( ), }, { slug: 'settings-and-privacy', title: 'Settings & Privacy', description: 'Control your account settings, data, and privacy options.', articleCount: 9, icon: ( ), }, { slug: 'premium', title: 'Premium', description: 'Learn about paid plans, billing, and premium features.', articleCount: 6, icon: ( ), }, { slug: 'security', title: 'Security', description: 'Two-factor authentication, connected apps, and account security.', articleCount: 7, icon: ( ), }, { slug: 'api-and-integrations', title: 'API & Integrations', description: 'Gitgram API reference, webhooks, and third-party integrations.', articleCount: 12, icon: ( ), }, { slug: 'community-guidelines', title: 'Community Guidelines', description: 'Acceptable use policy, content standards, and reporting abuse.', articleCount: 5, icon: ( ), }, ] const recentArticles: RecentArticle[] = [ { slug: 'how-to-link-github-account', category: 'Getting Started', categorySlug: 'getting-started', title: 'How to link your GitHub account to Gitgram', excerpt: 'Connect your GitHub account to automatically import your repositories, display your contribution graph, and verify your developer identity.', readTime: '3 min read', }, { slug: 'create-and-share-code-snippets', category: 'Posts & Snippets', categorySlug: 'posts-and-snippets', title: 'Creating and sharing syntax-highlighted code snippets', excerpt: 'Learn how to post code snippets with full syntax highlighting across 50+ languages, add descriptions, and embed them anywhere.', readTime: '4 min read', }, { slug: 'two-factor-authentication', category: 'Security', categorySlug: 'security', title: 'Setting up two-factor authentication (2FA)', excerpt: 'Protect your account with an authenticator app or SMS codes. This guide walks you through enabling 2FA step by step.', readTime: '5 min read', }, { slug: 'claim-repository-ownership', category: 'Repositories', categorySlug: 'repositories', title: 'Claiming ownership of your GitHub repositories', excerpt: 'Verify that a public GitHub repository belongs to you so it appears on your Gitgram profile with full social stats.', readTime: '3 min read', }, { slug: 'premium-plan-features', category: 'Premium', categorySlug: 'premium', title: 'What is included in Gitgram Premium?', excerpt: 'A complete breakdown of every feature unlocked by Premium: verified badge, advanced analytics, custom themes, ad-free browsing, and more.', readTime: '6 min read', }, ] export default function HelpPage() { const [searchQuery, setSearchQuery] = useState('') const filteredTopics = searchQuery.trim() ? helpTopics.filter( (topic) => topic.title.toLowerCase().includes(searchQuery.toLowerCase()) || topic.description.toLowerCase().includes(searchQuery.toLowerCase()) ) : helpTopics const filteredArticles = searchQuery.trim() ? recentArticles.filter( (article) => article.title.toLowerCase().includes(searchQuery.toLowerCase()) || article.excerpt.toLowerCase().includes(searchQuery.toLowerCase()) || article.category.toLowerCase().includes(searchQuery.toLowerCase()) ) : recentArticles return (
Search our documentation or browse by topic below.
No topics matched your search. Try a different term or{' '} contact support .
) : ({topic.description}
{topic.articleCount} articles ))}No articles matched your search.
) : ({article.excerpt}