import React, { useDeferredValue, useEffect, useState } from 'react' import { usePage } from '@inertiajs/react' import DocsCallout from '../../components/docs/DocsCallout' import DocsSection from '../../components/docs/DocsSection' import DocsSidebarNav from '../../components/docs/DocsSidebarNav' import DocsStepList from '../../components/docs/DocsStepList' import HelpGuideCard from '../../components/help/HelpGuideCard' import HelpSearchBar from '../../components/help/HelpSearchBar' import HelpSupportCta from '../../components/help/HelpSupportCta' import HelpTopicCard from '../../components/help/HelpTopicCard' import SeoHead from '../../components/seo/SeoHead' import { FEATURED_GUIDES, GETTING_STARTED_LINKS, GETTING_STARTED_STEPS, HELP_CATEGORIES, HIGHLIGHTED_GUIDES, POPULAR_HELP_TOPICS, SEARCH_SUGGESTIONS, SUPPORT_ITEMS, TROUBLESHOOTING_ITEMS, } from './helpCenterContent' function matchesQuery(item, query) { if (!query) return true const haystack = [ item.title, item.description, item.status, item.eyebrow, item.plannedPath, ...(item.tags || []), ...(item.highlights || []), ...(item.linkItems || []).map((linkItem) => linkItem.label), ].filter(Boolean).join(' ').toLowerCase() return haystack.includes(query) } function MiniLink({ item, href }) { return ( {item.label} ) } function PopularTopicCard({ item, href }) { return (

{item.title}

{item.description}

) } export default function HelpCenterPage() { const page = usePage() const { props, url } = page const links = props.links || {} const signedIn = Boolean(props.auth?.signed_in) const urlQuery = new URLSearchParams((url.split('?')[1] || '')).get('q') || '' const [query, setQuery] = useState(urlQuery) const normalizedQuery = useDeferredValue(query.trim().toLowerCase()) useEffect(() => { setQuery(urlQuery) }, [urlQuery]) const highlightedGuides = HIGHLIGHTED_GUIDES.filter((item) => matchesQuery(item, normalizedQuery)) const featuredGuides = FEATURED_GUIDES.filter((item) => matchesQuery(item, normalizedQuery)) const categories = HELP_CATEGORIES.map((category) => ({ ...category, topics: category.topics.filter((topic) => matchesQuery(topic, normalizedQuery)), })).filter((category) => category.topics.length > 0) const troubleshootingItems = TROUBLESHOOTING_ITEMS.filter((item) => matchesQuery(item, normalizedQuery)) const popularTopics = POPULAR_HELP_TOPICS.filter((item) => matchesQuery(item, normalizedQuery)) const totalMatches = highlightedGuides.length + featuredGuides.length + troubleshootingItems.length + popularTopics.length + categories.reduce((sum, category) => sum + category.topics.length, 0) const resultSummary = normalizedQuery ? `Showing ${totalMatches} matching help items for “${query.trim()}”.` : 'Search across live guides, planned help topics, popular questions, and troubleshooting shortcuts.' const supportItems = SUPPORT_ITEMS.map((item) => ({ ...item, href: links[item.linkKey], })) const jsonLd = [ { '@context': 'https://schema.org', '@type': 'WebPage', name: 'Help Center', description: props.description, url: props.seo?.canonical, }, { '@context': 'https://schema.org', '@type': 'ItemList', itemListElement: FEATURED_GUIDES.map((item, index) => ({ '@type': 'ListItem', position: index + 1, name: item.title, })), }, ] return (

Skinbase Help Center

Find the right guide, quickstart, FAQ, or fix without digging through scattered help.

This is the central help hub for Skinbase. Use it to get started, find module-specific guidance, open the live Groups documentation set, and move quickly toward the next useful answer.

setQuery('')} suggestions={SEARCH_SUGGESTIONS} resultSummary={resultSummary} />
{normalizedQuery ? ( Search is filtering the live guides, planned topics, popular questions, and troubleshooting shortcuts below. Clear the search anytime to return to the full Help Center view. ) : ( Start with the highlighted live guides if you need complete written help now. Use the category sections to see the long-term help architecture and the next high-priority modules that will expand after Groups. )}
{highlightedGuides.map((item) => ( ))}
{featuredGuides.map((item) => ( ))}
{categories.map((category) => (
{category.topics.map((topic) => ( ))}
))}

Quick links

{GETTING_STARTED_LINKS.map((item) => ( ))}
{troubleshootingItems.map((item) => (

{item.title}

{item.description}

{item.linkLabel}
))}
{popularTopics.map((item) => ( ))}
) }