import { Layout as AntdLayout, Breadcrumb, Col, Menu, Row, notification } from "antd"; import { AuthWidget } from "./Pages/AuthWidget"; import { Content, Header } from "antd/lib/layout/layout"; import { LaptopOutlined, NotificationOutlined, UserOutlined } from "@ant-design/icons"; import { Link, useHistory, useRouteMatch } from "react-router-dom"; import { NLView } from "./types"; import { get } from "lodash"; import { useActions, useAppState } from "./overmind"; import { useEffect } from "react"; import Sider from "antd/lib/layout/Sider"; import SubMenu from "antd/lib/menu/SubMenu"; import { AUTH_FLOW_STATUS } from "./overmind/auth/state"; import { PlusCircleOutlined } from "@ant-design/icons"; export const Layout: NLView = ({ children }) => { const state = useAppState(); const actions = useActions(); const history = useHistory(); const match = useRouteMatch(); useEffect(() => { // setTimeout(() => { history.listen((location) => actions.routing.onRouteChange({ location })); // }) }, []); // useEffect(() => { // state.routing.location && history.push(state.routing.location); // }, [state.routing.location]); return (
{/*
*/} {/* ${state.indicators.inProgress ? "rotating" : ""} */}
Subscribe
About Creative Search Explore {/* What */} {/* */} {/* */}
{ state.auth.status < AUTH_FLOW_STATUS.AUTHENTICATED ? ( // || NONPOSTAUTHLOCATIONS.includes(state.routing.location) <> { //@ts-ignore state.routing.breadcrumbs.map((b, i, a) => ( <> {b.url ? ( {b.url ? {b.text} : b.text} ) : ( {b.text} )} )) } {state.routing.breadcrumbs.length ? > : ""}
{children}
) : ( "Checking authorization..." ) //
{JSON.stringify(state.auth.status)} {state.routing.location} {window.location.pathname} {!!NONPOSTAUTHLOCATIONS.includes(window.location.pathname)}
}
); }; { /* } title="subnav 1"> why what who } title="subnav 2"> option5 option6 option7 option8 } title="subnav 3"> option9 option10 option11 option12 */ }