Added langauge localization files to use masterdata and futureproof translations.

This commit is contained in:
Patrick Fic
2019-12-31 12:57:17 -08:00
parent 14147ded53
commit 226933f2d7
11 changed files with 170 additions and 73 deletions

View File

@@ -1,27 +1,28 @@
import React from "react";
import { Link } from "react-router-dom";
import { useApolloClient } from "@apollo/react-hooks";
import { Menu, Icon } from "antd";
import "./header.styles.scss";
import SignOut from "../sign-out/sign-out.component";
import ManageSignInButton from "../manage-sign-in-button/manage-sign-in-button.component";
import { useApolloClient } from "@apollo/react-hooks";
import GlobalSearch from "../global-search/global-search.component";
import LanguageSelector from "../language-selector/langauge-selector.component";
export default ({ landingHeader, navItems, selectedNavItem }) => {
const apolloClient = useApolloClient();
const handleClick = e => {
apolloClient.writeData({ data: { selectedNavItem: e.key } });
};
return (
<Menu
theme="dark"
className="header"
theme='dark'
className='header'
onClick={handleClick}
selectedKeys={selectedNavItem}
mode="horizontal"
>
mode='horizontal'>
<Menu.Item>
<GlobalSearch />
</Menu.Item>
@@ -43,6 +44,8 @@ export default ({ landingHeader, navItems, selectedNavItem }) => {
<ManageSignInButton />
</Menu.Item>
)}
{!landingHeader ? <LanguageSelector /> : null}
</Menu>
);
};