import "@/styles/trill.css"; import "@/styles/feed.css"; import PostList from "@/components/feed/PostList"; import useLocalState from "@/state/state"; import { useParams } from "wouter"; import spinner from "@/assets/triangles.svg"; import { useState } from "react"; import Composer from "@/components/composer/Composer"; import { ErrorPage } from "@/pages/Error"; import NostrFeed from "@/components/nostr/Feed"; import { consolidateFeeds, disaggregate } from "@/logic/nostrill"; type FeedType = "urbit" | "following" | "nostr"; function Loader() { const params = useParams(); if (!params.taip) return ; // if (params.taip === "urbit") return ; if (params.taip === "following") return ; if (params.taip === "nostr") return ; // else if (param === FeedType.Rumors) return ; // else if (param === FeedType.Home) return ; else return ; } function FeedPage({ t }: { t: FeedType }) { const [active, setActive] = useState(t); return ( <> setActive("urbit")} > Urbit setActive("following")} > Following setActive("nostr")} > Nostr {active === "urbit" ? ( ) : active === "following" ? ( ) : active === "nostr" ? ( ) : null} > ); } function Urbit() { const following = useLocalState((s) => s.following); const feed = disaggregate(following, "urbit"); return ( {}} /> ); } function Following() { const following = useLocalState((s) => s.following); const feed = consolidateFeeds(following); return ( {}} /> ); } export default Loader; // TODO type MixFeed = any; function Inner({ data, refetch }: { data: MixFeed; refetch: Function }) { return ; }