Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add link to blog #784

Open
wants to merge 5 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion public/locales/de/translations.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,8 @@
"en": "Englisch",
"de": "Deutsch",
"ru": "Russisch",
"listcoin": "Bezahlte Kryptowährungsliste"
"listcoin": "Bezahlte Kryptowährungsliste",
"blog": "Blog"
},
"hero": {
"1": "Umtausch von Kryptowährungen",
Expand Down
3 changes: 2 additions & 1 deletion public/locales/en/translations.json
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,8 @@
"terms-and-conditions": "Terms and Conditions",
"privacy-policy": "Privacy Policy",
"pricecomparsion": "pricecomparsion",
"team": "Team"
"team": "Team",
"blog": "Blog"
},
"account": {
"account": "Account",
Expand Down
3 changes: 2 additions & 1 deletion public/locales/ru/translations.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,8 @@
"en": "Английский",
"de": "Немецкий",
"ru": "Русский",
"listcoin": "Размещение криптовалюты"
"listcoin": "Размещение криптовалюты",
"blog": "Блог"
},
"hero": {
"1": "Обмен Криптовалют",
Expand Down
6 changes: 6 additions & 0 deletions src/App.js
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,11 @@ const App = () => {

return <Redirect to={`/${lang}/not-found`} />;
};

const redirectToBlog = () => {
window.location.replace(`${window.location.host}/blog`);
window.location.reload();
}

return (
<GraphCMSProvider>
Expand All @@ -95,6 +100,7 @@ const App = () => {
<Header />

<Switch>
<Route exact path="/blog" render={redirectToBlog}/>
<Route exact path="/" render={props => <Redirect to={`/${lang}${props.location.search}`} />} />
<Route exact path="/:lang(en|de|ru)/terms-and-conditions" component={TermsConditions} />
<Route exact path="/:lang(en|de|ru)/privacy" component={Privacy} />
Expand Down
7 changes: 7 additions & 0 deletions src/components/Footer/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,13 @@ const Footer = props => {
<li>
<a href="https://nexchange2.docs.apiary.io/">{t('header.apidocumentation')}</a>
</li>
<li>
<Link
to="/blog"
>
{t('header.blog')}
</Link>
</li>
<li>
<Link
onClick={() => {
Expand Down