Navigation.tsx 720 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
5

// interface INavigation extends React.ClassAttributes<any> {}
Maksym Tishchenko's avatar
Maksym Tishchenko committed
6
class Navigation extends React.Component<WithTranslation, any> {
Matija Obreza's avatar
Matija Obreza committed
7
8

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

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

export default withTranslation()(Navigation);