import { Button } from "antd"; import { CrossCircle } from "./Components/Icons/CrossCircle"; import { DEFAULT_ROUTES } from "./defaultRoutes"; import { NLView } from "./types"; import { PartialConfiguration } from "./config"; import { Provider } from "overmind-react"; import { BrowserRouter as Router, Switch, useHistory } from "react-router-dom"; import { overmind as _overmind, useActions, useAppState } from "./overmind"; import { useCachedMoodPosts } from "./hooks/useCached2"; import { useEffect } from "react"; const DexieTest = () => { const ps = useCachedMoodPosts({ id: "a4bfb1d2-88d8-8f9a-7b96-9042f9e97434" }); return ( <> !{JSON.stringify(ps)} {ps.posts.length} ); }; const AppShell: NLView = ({ children }) => { const state = useAppState(); const history = useHistory(); const actions = useActions(); const flags = state.flows.userJourney.flags; useEffect(() => { // setTimeout(() => { const cancel = history.listen((location) => actions.routing.onRouteChange({ location: location })); actions.routing.onRouteChange({ location: window.location }); actions.routing.setHistory({ history }); // }) return cancel; }, []); // if (!state.cache.ready) return <>Getting ready...; // if (state.cache.ready) return ; return ( <>
{!flags["bannerDisabled"] && (
{!flags["banner"] ? (

      Any voting actions and proposals you hand in will only be beta tests on the Newcoin Testnet. Go to our Telegram group to hear more about the next steps and the Newcoin Testnet. Your username on testnet is however your username on mainnet. Pick your name and reserve it now!       Any voting actions and proposals you hand in will only be beta tests on the Newcoin Testnet. Go to our Telegram group to hear more about the next steps and the Newcoin Testnet. Your username on testnet is however your username on mainnet. Pick your name and reserve it now!

) : (

Any voting actions and proposals you hand in will only be beta tests on the Newcoin Testnet. Go to our Telegram group to hear more about the next steps and the Newcoin Testnet. Your username on testnet is however your username on mainnet. Pick your name and reserve it now!

)} actions.flows.userJourney.setFlag({ flag: "banner", value: "true", }) } > {!flags["banner"] ? ( ) : ( )}
)} {/* {!state.routing.location.includes("/folder/") && ( */} {/* )} */}
{/* [AUTH]
						state.auth.status: {state.auth.status} 
state.api.auth.user.id: {state.api.auth.user?.id}
state.api.auth.status: {state.api.auth.status}
state.api.auth.user.status: {state.api.auth.user?.status}
*/} {state.config.routes.useDefaultRoutes ? DEFAULT_ROUTES(state) : <>} {children}
); }; const overmindSampleCustomConfig = { components: { icons: { Logo: () => <>THIS IS THE LOGO DUDE, }, layout: { TopMenu: () =>
Custom top menu!
, Layout: () =>
Custom layout
, }, }, }; export const App: NLView<{ overmind: ReturnType; config?: PartialConfiguration; }> = ({ children, overmind }) => { return ( {children || []} ); }; export default App;