Skip to content

Commit

Permalink
fix: translation links (add prefix)
Browse files Browse the repository at this point in the history
  • Loading branch information
maxpou committed Jun 1, 2020
1 parent 0e0d7cb commit 7caeefd
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/components/SEO.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ const SEO = props => {
<link
rel="alternate"
hreflang={translation.hreflang}
href={formatedSiteUrl + translation.link}
href={formatedSiteUrl + withPrefix(translation.link)}
/>
))}

Expand Down
3 changes: 2 additions & 1 deletion src/components/Translations.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import React, { Fragment } from 'react'
import { withPrefix } from 'gatsby'
import styled from 'styled-components'
import { colors } from '../tokens'

Expand Down Expand Up @@ -29,7 +30,7 @@ class Translations extends React.Component {
{translations.map((translation, i) => {
return (
<Fragment key={`translation-${i}`}>
<TranslationLink href={translation.link}>
<TranslationLink href={withPrefix(translation.link)}>
{translation.language}
</TranslationLink>
{i < translations.length - 1 ? ', ' : ''}
Expand Down

0 comments on commit 7caeefd

Please sign in to comment.