We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent ce3c1f8 commit 2ead701Copy full SHA for 2ead701
1 file changed
src/components/doc-version/index.jsx
@@ -1,6 +1,6 @@
1
import { useCallback } from 'preact/hooks';
2
import { useLocation, useRoute } from 'preact-iso';
3
-import config from '../../config.json';
+import { docRoutes } from '../../lib/route-utils.js';
4
import style from './style.module.css';
5
6
export const LATEST_MAJOR = 'v10';
@@ -17,7 +17,7 @@ export default function DocVersion() {
17
const onChange = useCallback(
18
e => {
19
const version = e.currentTarget.value;
20
- const url = config.docs[version]?.[name]
+ const url = docRoutes[version]?.[`/${name}`]
21
? path.replace(/(v\d{1,2})/, version)
22
: `/guide/${version}/getting-started`;
23
route(url);
0 commit comments