Navigation.tsx 930 Bytes
Newer Older
Matija Obreza's avatar
Matija Obreza committed
1
2
import React from 'react';
import { Link } from 'react-router-dom';
Maksym Tishchenko's avatar
Maksym Tishchenko committed
3
import {WithTranslation, withTranslation} from "react-i18next";
Matija Obreza's avatar
Matija Obreza committed
4

Oleksii Savran's avatar
Oleksii Savran committed
5
6
7
interface INavigation extends React.ClassAttributes<any>, WithTranslation {}

class Navigation extends React.Component<INavigation, any> {
Matija Obreza's avatar
Matija Obreza committed
8
9

  public render() {
Maksym Tishchenko's avatar
Maksym Tishchenko committed
10
11
    const { t } = this.props;

Matija Obreza's avatar
Matija Obreza committed
12
13
14
15
    return (
      <header>
        <nav>
          <ul style={ { display: 'flex', listStyle: 'none' } }>
Maksym Tishchenko's avatar
Maksym Tishchenko committed
16
            <li style={ { marginRight: '20px' } }><Link to="/">{t("nav.home")}</Link></li>
Maksym Tishchenko's avatar
Maksym Tishchenko committed
17
            <li style={ { marginRight: '20px' } }><Link to="/overview">{t('nav.overview')}</Link></li>
Maksym Tishchenko's avatar
Maksym Tishchenko committed
18
            <li style={ { marginRight: '20px' } }><Link to="/api-info">{t("nav.apiInfo")}</Link></li>
Oleksii Savran's avatar
Oleksii Savran committed
19
            <li style={ { marginRight: '20px' } }><Link to="/cart/">{t('nav.cart')}</Link></li>
Matija Obreza's avatar
Matija Obreza committed
20
21
22
23
24
25
          </ul>
        </nav>
      </header>
    );
  };
}
Maksym Tishchenko's avatar
Maksym Tishchenko committed
26
27

export default withTranslation()(Navigation);