Redirect when signed in and going to sign in page.
This commit is contained in:
@@ -23,7 +23,7 @@ class Header extends Component {
|
||||
{navItems.map(navItem => (
|
||||
<Menu.Item key={navItem.title}>
|
||||
<Link to={navItem.path}>
|
||||
<Icon type={navItem.icontype} />
|
||||
{navItem.icontype ? <Icon type={navItem.icontype} /> : null}
|
||||
{navItem.title}
|
||||
</Link>
|
||||
</Menu.Item>
|
||||
|
||||
@@ -27,6 +27,7 @@ const HeaderContainer = ({ landingHeader }) => {
|
||||
if (loading) return <Spin />;
|
||||
if (error) return <Alert message={error.message} />;
|
||||
const parsedNavItems = JSON.parse(data.masterdata_by_pk.value);
|
||||
console.log("::1", landingHeader);
|
||||
return (
|
||||
<Header
|
||||
selectedNavItem={selectedNavItem}
|
||||
|
||||
@@ -1,9 +1,10 @@
|
||||
import React from "react";
|
||||
import HeaderContainer from "../header/header.container";
|
||||
|
||||
export default function ManageShop() {
|
||||
return (
|
||||
<div>
|
||||
|
||||
<HeaderContainer />
|
||||
This is the manage shop component.
|
||||
</div>
|
||||
);
|
||||
|
||||
@@ -1,27 +1,7 @@
|
||||
import React from "react";
|
||||
import { Query } from "react-apollo";
|
||||
import { gql } from "apollo-boost";
|
||||
|
||||
import { Alert } from "antd";
|
||||
import Spin from '../loading-spinner/loading-spinner.component'
|
||||
import ManageShop from "./manage-shop.component";
|
||||
|
||||
const GET_NAV_ITEMS = gql`
|
||||
query nav_items {
|
||||
masterdata_by_pk(key: "NAV_ITEMS") {
|
||||
value
|
||||
}
|
||||
}
|
||||
`;
|
||||
|
||||
const ManageShopContainer = () => (
|
||||
<Query query={GET_NAV_ITEMS}>
|
||||
{({ loading, error, data }) => {
|
||||
if (loading) return <Spin />;
|
||||
if (error) return <Alert message={error.message} />;
|
||||
return <ManageShop />;
|
||||
}}
|
||||
</Query>
|
||||
);
|
||||
const ManageShopContainer = () => <ManageShop />;
|
||||
|
||||
export default ManageShopContainer;
|
||||
|
||||
Reference in New Issue
Block a user