mirror of
https://github.com/Crosstalk-Solutions/project-nomad.git
synced 2026-03-28 11:39:26 +01:00
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>
31 lines
835 B
TypeScript
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>
|
|
)
|
|
}
|