an app to share curated trails sidetrail.app
1

Configure Feed

Select the types of activity you want to include in your feed.

1import { HomeTabBadges } from "./HomeTabBadges"; 2import { SegmentTabs } from "./SegmentTabs"; 3import { loadWalkingBadges, loadCurrentDid } from "../data/queries"; 4import { loadDraftsBadges } from "@/data/drafts/queries"; 5 6export async function HomeTabs() { 7 const showPublishedTab = false; 8 const [walkingBadges, draftBadges] = await Promise.all([ 9 loadWalkingBadges(), 10 loadCurrentDid().then((did) => (did ? loadDraftsBadges() : [])), 11 ]); 12 return ( 13 <SegmentTabs 14 segments={[ 15 { segment: "(index)", title: "trails", href: "/" }, 16 { 17 segment: "walking", 18 title: "walking", 19 children: <HomeTabBadges items={walkingBadges} />, 20 }, 21 { 22 segment: "drafts", 23 title: "drafts", 24 children: <HomeTabBadges items={draftBadges} />, 25 }, 26 ...(showPublishedTab ? [{ segment: "published", title: "published" }] : []), 27 ]} 28 /> 29 ); 30}