import { About } from "./Pages/About"; import { ActivityStream } from "./Components/ActivityStream"; import { Auth } from "./Pages/Auth/Auth"; import { Authenticate } from "./Pages/Onboarding/Authenticate"; import { CreateUser } from "./Pages/Onboarding/CreateUser"; import { DomainSelector, Done, LinkHash } from "./Pages/Onboarding"; import { InviteesList, UserInvite } from "./Pages/User/UserInvite"; import { JoinDao } from "./Pages/JoinDao"; import { LegacyImport } from "./Pages/User/LegacyImport"; import { Mood } from "./Pages/Mood/Mood"; import { MoodCreate } from "./Pages/Mood/MoodCreate"; import { NLView } from "./types"; import { NotInvited } from "./Pages/Onboarding/NotInvited"; import { OnboardingTypeSelector } from "./Pages/Onboarding/OnboardingTypeSelector"; import { OverridableRoute } from "./Components/OverridableRoute"; import { Post, PostInTags } from "./Pages/Post/Post"; import { PostCreate } from "./Pages/Post/components/PostCreate"; import { Privacy } from "./Pages/Privacy"; import { Product } from "./Pages/Store/Product"; import { ProposalsPage } from "./Pages/Dao/Views/Proposals/ProposalList"; import { Route } from "react-router-dom"; import { SearchCreativePost } from "./Pages/SearchCreativePost"; import { SelectMoodForm } from "./Components/SelectMood"; import { State } from "./overmind/overmind"; import { TOS } from "./Pages/TOS"; import { User } from "./Pages/User/User"; import { UserCreate } from "./Pages/User/UserCreate"; import { UserStake } from "./Components/UserWidget"; import { UserUpdate } from "./Pages/User/UserUpdate"; import { ViewProposalPage } from "./Pages/Dao/Views/ProposalView/ViewProposal"; import { ViewWhitelistProposalPage } from "./Pages/Dao/Views/WhitelistProposalView/ViewWhitelistProposal"; import { daoRoutes } from "./Pages/Dao"; import { fischerYates } from "./utils/random"; import { useActions, useAppState } from "./overmind"; import { useEffect } from "react"; import Creators, { TopCreators } from "./Components/Creators"; import DaoCreate from "./Pages/Dao/Views/DaoCreate/DaoCreate"; import Explore from "./Pages/Explore/Explore"; import MyMoods from "./Pages/Mood/MyMoods"; import NewProposal from "./Pages/Dao/Views/NewProposal/NewProposal"; import Notifications from "./Components/Icons/Notifications"; import SearchCreative from "./Pages/SearchCreative"; import SearchTag from "./Pages/Tag/TagSearch"; import Spotlights from "./Components/Spotlights"; import TopFolders from "./Components/TopFolders"; import TopHashtags from "./Components/TopHashtags"; import UserTop from "./Pages/User/Top"; type HostDef = { hosts: string[]; components: { Explore: NLView; Root: NLView; }; }; const UnknownHost: HostDef = { hosts: [], components: { Root: () => <>UnknownHost, Explore: () => <>, }, }; const testDomain = window.location.host; const HostToDomain: HostDef[] = [ { hosts: ["newlink.page"], components: { Root: LinkHash, Explore: UserTop, }, }, { hosts: ["localhost", "www.newlife.io", "web.newlife.io", "web-dev.newlife.io", "share.newlife.io", "test.newlife.io"], components: { Root: LinkHash, Explore: Explore, }, }, { hosts: ["unsid.org", "web-dev.unsid.org"], components: { Root: LinkHash, Explore: () => ( <> You are good to go.
Use Newsafe to access the apps in the Newcoin ecosystem:

), }, }, { hosts: ["dao.newmoon.ac"], components: { Root: LinkHash, Explore: () => { const actions = useActions(); useEffect(() => { actions.routing.historyPush({ location: "/dao/newmoon.io" }); }, []); return <>; }, }, }, ]; // const isNewlink = /newlink.page/.test(window.location.host) const currentHost = window.location.host.replace(/:\d+/, ""); const HostBasedComponents = HostToDomain.find((htd) => htd.hosts.find((h) => h === currentHost))?.components || UnknownHost.components; const View: NLView = (props) =>
{props.children}
; const Topics = () =>

Topics

; export const DEFAULT_ROUTES = (state: State) => [ , , , , , , , , // , , , , , , , , , , , , , , , , , , , , , , , // DAO ...daoRoutes, // Onboarding v2 , , , , , , // User Invite , , // Metamask , // TOP , , , , } />, } />, , ];