Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -133,14 +133,22 @@ export const Route = createFileRoute(
})

function Docs() {
const { content, filePath, title } = Route.useLoaderData()
const loaderData = Route.useLoaderData()
const versionMatch = useMatch({ from: '/_library/$libraryId/$version' })
const config = versionMatch.loaderData?.config
const { version, libraryId, framework } = Route.useParams()
const library = getLibrary(libraryId)
const branch = getBranch(library, version)
const location = useLocation()

// Loader data can be briefly undefined on client navigations (e.g. browser
// back) while the loader is still resolving.
if (!loaderData) {
return null
}

const { content, filePath, title } = loaderData

return (
<DocContainer>
<Doc
Expand Down
Loading