Skip to content

Commit

Permalink
fix: useBaseUrl on translated links (verdaccio#2353)
Browse files Browse the repository at this point in the history
  • Loading branch information
Sergio Moreno authored Jul 27, 2021
1 parent 25a4601 commit d1d820f
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 4 deletions.
2 changes: 1 addition & 1 deletion website/src/components/Features.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ const Features = (): React.ReactElement => (
))}
</div>
<div className={styles.linkFeatures}>
<Link to="/docs/configuration" className="link-primary">
<Link to={useBaseUrl("/docs/configuration")} className="link-primary">
<Translate>Discover more features</Translate>
</Link>
</div>
Expand Down
2 changes: 1 addition & 1 deletion website/src/components/Header.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ const Header = (): React.ReactElement => {
<a href="https://github.com/verdaccio/verdaccio" className="link-secondary">
GITHUB
</a>
<Link to="/docs/what-is-verdaccio" className="link-primary">
<Link to={useBaseUrl("/docs/what-is-verdaccio")} className="link-primary">
<Translate>GET STARTED</Translate>
</Link>
<a href="https://github.com/verdaccio/verdaccio/blob/master/CONTRIBUTING.md" className="link-secondary">
Expand Down
3 changes: 2 additions & 1 deletion website/src/components/WhatIsVerdaccio.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import React from 'react';
import Translate from '@docusaurus/Translate';
import { Link } from '@docusaurus/router';
import useBaseUrl from '@docusaurus/useBaseUrl';
import Divider from './Divider';

import styles from './WhatIsVerdaccio.module.scss';
Expand All @@ -19,7 +20,7 @@ const WhatIs = (): React.ReactElement => (
services such as Amazon&apos;s S3, Google Cloud Storage or create your own plugin.
</Translate>
</p>
<Link to="/docs/installation" className="link-primary">
<Link to={useBaseUrl("/docs/installation")} className="link-primary">
<Translate>Dive into Verdaccio</Translate>
</Link>
<Divider />
Expand Down
3 changes: 2 additions & 1 deletion website/src/pages/help.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import { Follow } from 'react-twitter-widgets';
import Translate from '@docusaurus/Translate';
import clsx from 'clsx';
import useDocusaurusContext from '@docusaurus/useDocusaurusContext';
import useBaseUrl from '@docusaurus/useBaseUrl';

import styles from './help.module.scss';

Expand Down Expand Up @@ -56,7 +57,7 @@ const SUPPORT_LINKS = (lang: string) => [
<Translate
values={{
link: (
<Link to="/docs/what-is-verdaccio">
<Link to={useBaseUrl("/docs/what-is-verdaccio")}>
<Translate>documentation on this site</Translate>
</Link>
),
Expand Down

0 comments on commit d1d820f

Please sign in to comment.