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 8b06e8d commit a08708bCopy full SHA for a08708b
src/Link.tsx
@@ -8,7 +8,7 @@ type Props = GatsbyLinkProps<any> & {language?: string};
8
export const Link: React.FC<Props> = ({language, to, onClick, ...rest}) => {
9
const context = useContext(I18nextContext);
10
const urlLanguage = language || context.language;
11
- const link = context.routed || language ? `/${urlLanguage}${to}` : `${to}`;
+ const link = urlLanguage !== context.defaultLanguage ? `/${urlLanguage}${to}` : `${to}`;
12
13
return (
14
// @ts-ignore
0 commit comments