Skip to content

Commit c2d3d90

Browse files
committed
fix: sample-app link
1 parent 43a4100 commit c2d3d90

File tree

2 files changed

+2
-8
lines changed

2 files changed

+2
-8
lines changed

src/pages/index.tsx

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,6 @@ import Layout from '@theme/Layout';
77
import type { FunctionComponent } from 'react';
88
import React from 'react';
99
import { KoliBriAbbr } from '../components/KoliBriAbbr';
10-
import { useDocsPreferredVersion } from '@docusaurus/theme-common';
11-
import { determinateVersionId } from '../shares/version';
1210

1311
const HomepageHeader: FunctionComponent = () => (
1412
<header className="p-8 grid justify-center">
@@ -25,8 +23,6 @@ const HomepageHeader: FunctionComponent = () => (
2523
</header>
2624
);
2725
const HomepageButtons: FunctionComponent = () => {
28-
const docVersion = useDocsPreferredVersion();
29-
const version = determinateVersionId(docVersion);
3026

3127
return (
3228
<div className="grid sm:flex gap-4 justify-center mt-4">
@@ -50,7 +46,7 @@ const HomepageButtons: FunctionComponent = () => {
5046
></KolLinkButton>
5147
<KolLinkButton
5248
className="w-72"
53-
_href={`/${version}/sample-react/#/handout/basic`}
49+
_href={`/sample-react/#/handout/basic`}
5450
_label={translate({
5551
id: 'custom.sample-app-button',
5652
})}

src/theme/Navbar/index.tsx

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,6 @@ export const NavbarWrapper: FunctionComponent<PropsWithChildren> = (props) => {
2727
// setDark(false);
2828
// },
2929
// };
30-
const docVersion = useDocsPreferredVersion();
31-
const version = determinateVersionId(docVersion);
3230

3331
return (
3432
<div className="kolibri-navbar-wrapper sticky top-0 z-50 bg-white">
@@ -88,7 +86,7 @@ export const NavbarWrapper: FunctionComponent<PropsWithChildren> = (props) => {
8886
</div> */}
8987
<div>
9088
<KolLinkButton
91-
_href={`/${version}/sample-react/#/handout/basic`}
89+
_href={`/sample-react/#/handout/basic`}
9290
_icons={'codicon codicon-preview'}
9391
_hideLabel
9492
_label={translate({

0 commit comments

Comments
 (0)