import { useActions, useAppState } from "../overmind/overmind"; import { NLView } from "@newstackdev/iosdk/dist/types"; import { NewsafeAuth } from "@newstackdev/iosdk/dist/Components/NewsafeAuth"; import { Layout, Row, Col, Spin, Menu } from "antd"; import { Link } from "react-router-dom"; import { useOvermindRouting } from "../hooks/useOvermindRouting"; const { Header, Footer, Sider, Content } = Layout; export const AppLayout: NLView = ({ children }) => { const state = useAppState(); const actions = useActions(); useOvermindRouting(); const loggedIn = state.api.auth.user?.username; const isAllowed = state.routing.isAllowed; return
{state.config.settings.app.name} {loggedIn || "not authenticated"}
Home Explore Counter {loggedIn && Sign Out } { state.indicators.specific["newgraphApplication.authWithUnsid"] ? : loggedIn || isAllowed ? children : }
}