Replaced remaining parts of app to use Redux.

This commit is contained in:
Patrick Fic
2020-01-31 13:57:27 -08:00
parent 3060c16dd3
commit e2518a95ab
12 changed files with 104 additions and 168 deletions

View File

@@ -1,4 +1,3 @@
import { useApolloClient } from "@apollo/react-hooks";
import { Col, Icon, Menu, Row } from "antd";
import React from "react";
import { useTranslation } from "react-i18next";
@@ -7,21 +6,15 @@ import CurrentUserDropdown from "../current-user-dropdown/current-user-dropdown.
import GlobalSearch from "../global-search/global-search.component";
import ManageSignInButton from "../manage-sign-in-button/manage-sign-in-button.component";
export default ({ landingHeader, navItems, selectedNavItem }) => {
const apolloClient = useApolloClient();
export default ({ landingHeader, selectedNavItem }) => {
const { t } = useTranslation();
const handleClick = e => {
apolloClient.writeData({ data: { selectedNavItem: e.key } });
};
return (
<Row type="flex" justify="space-around">
<Col span={16}>
<Menu
theme="dark"
className="header"
onClick={handleClick}
selectedKeys={selectedNavItem}
mode="horizontal"
>