project-nomad/admin/inertia/layouts/DocsLayout.tsx
Chris Sherwood 1a95b84a8c feat(docs): polish docs rendering with desert-themed components
Add custom Markdoc renderers for images, links, paragraphs, code blocks,
inline code, and horizontal rules. Restyle existing heading, table, and
list components to match the desert tactical color palette. Add 8
screenshots to docs with polished image presentation (rounded corners,
shadow, captions). Constrain content width for readability.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-06 14:41:30 -08:00

31 lines
835 B
TypeScript

import { useQuery } from '@tanstack/react-query'
import { useMemo } from 'react'
import StyledSidebar from '~/components/StyledSidebar'
import api from '~/lib/api'
export default function DocsLayout({ children }: { children: React.ReactNode }) {
const { data, isLoading } = useQuery<Array<{ title: string; slug: string }>>({
queryKey: ['docs'],
queryFn: () => api.listDocs(),
refetchOnWindowFocus: false,
staleTime: Infinity,
})
const items = useMemo(() => {
if (isLoading || !data) return []
return data.map((doc) => ({
name: doc.title,
href: `/docs/${doc.slug}`,
current: false,
}))
}, [data, isLoading])
return (
<div className="min-h-screen flex flex-row bg-desert-white">
<StyledSidebar title="Documentation" items={items} />
{children}
</div>
)
}