| 1 | 1 | | import { Check, ChevronDown, CircleUserRound, Compass, LayoutGrid, Plus, Settings } from "lucide-react"; |
| 2 | | − | import { type ReactNode, useState } from "react"; |
| 2 | + | import { Fragment, type ReactNode, useState } from "react"; |
| 3 | 3 | | import { Link, useLocation, useNavigation } from "react-router"; |
| 4 | 4 | | |
| 5 | 5 | | import { type Membership, type User, hasCodeAccess, shownUsername } from "@g1t/contracts"; |
| ⋯ |
| 262 | 262 | | <SidebarContent className="items-center gap-0"> |
| 263 | 263 | | <SidebarMenu className="w-auto shrink-0 gap-2"> |
| 264 | 264 | | {builtins.map((item) => ( |
| 265 | | − | <RailLink |
| 266 | | − | key={item.key} |
| 267 | | − | to={modeHome(item.key, slug)} |
| 268 | | − | label={item.label} |
| 269 | | − | icon={appIcon(item.key as BuiltinApp, 20)} |
| 270 | | − | current={here === item.key && !shown.some((app) => at(app.to))} |
| 271 | | − | badge={item.badge} |
| 272 | | − | /> |
| 265 | + | <Fragment key={item.key}> |
| 266 | + | <RailLink |
| 267 | + | to={modeHome(item.key, slug)} |
| 268 | + | label={item.label} |
| 269 | + | icon={appIcon(item.key as BuiltinApp, 20)} |
| 270 | + | current={here === item.key && !shown.some((app) => at(app.to))} |
| 271 | + | badge={item.badge} |
| 272 | + | /> |
| 273 | + | {/* Right after Home: g1t beyond your workspaces (Explore, search, profiles, other workspaces and their public projects). */} |
| 274 | + | {item.key === "home" && ( |
| 275 | + | <RailLink to="/explore" label="Explore" icon={<Compass size={20} />} current={here === "browse" || at("/explore")} /> |
| 276 | + | )} |
| 277 | + | </Fragment> |
| 273 | 278 | | ))} |
| 274 | | − | {/* g1t beyond your workspaces: Explore, search, profiles, other workspaces and their public projects. */} |
| 275 | | − | <RailLink to="/explore" label="Explore" icon={<Compass size={20} />} current={here === "browse" || at("/explore")} /> |
| 276 | 279 | | </SidebarMenu> |
| 277 | 280 | | {/* Your pinned apps: as many as you like, scrolling under a fade at either end. */} |
| 278 | 281 | | {shown.length > 0 && ( |