(false);
const actions = useActions();
const isAuthorized = state.api.auth.authorized;
// const setVisible = (v: boolean) =>
// actions.flows.userJourney.setFlag({
// flag: "walletShown",
// value: v ? "true" : "",
// });
// const walletShown = !!state.flows.userJourney.flags.walletShown;
const routes = state.flows.user.create.isLegacyUpdateOngoing
? [...state.config.routes.noBackButton, "/signup/create"]
: state.config.routes.noBackButton;
const isAllowedPath = !routes.find((r) => state.routing.location.includes(r));
return (
} mode="horizontal">
Newlife.IO
{isAllowedPath && isAuthorized && }
{isAllowedPath && }
{/*
*/}
{/*
setSearch(!search)}>
*/}
{/*
setSearch(!search)}>
*/}
{isAuthorized ? (
<>
Explore
{/* */}
Upload
DAO
showPopUp(`https://auth${state.config.env.env == "dev" ? "-dev" : ""}.newsafe.org/wallet`, "__NEWSAFE__")
}
>
{/*
Wallet */}
{/*
*/}
>
) : (
<>>
)}
{/*
My moods
*/}
);
};
const Main: NLView = ({ children }) => {
const state = useAppState();
return (
{state.auth.initialized && state.routing.isAllowed ? <>{children}> : }
);
};
export const Layout: NLView = ({ children }) => {
const state = useAppState();
return (
{/* !{JSON.stringify(state.api.auth.user?.status)} */}
{children}
{state.ux.layout.footerShown && }
);
};