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 @@ -8,6 +8,16 @@ definePageMeta({
// '/code/@:org?/:packageName/v/:version/:filePath(.*)?',
],
scrollMargin: 160,
// needed to keep the file-tree in-place when navigating files (otherwise the filetree scroll position snaps to the top)
// changing the version (or org/packageName for that matter) causes a re-render
key: route => {
const { org, packageName, version } = route.params as {
org?: string
packageName: string
version: string
}
return `/package-code/${org ?? ''}/${packageName}/v/${version}`
},
})

const route = useRoute('code')
Expand Down
Loading