feat: home space list (#1400)

This commit is contained in:
Philip Okugbe
2025-07-25 00:21:40 +01:00
committed by GitHub
parent 662460252f
commit b30bf61dc4
10 changed files with 255 additions and 8 deletions

View File

@ -27,6 +27,8 @@ export function AppHeader() {
const { isTrial, trialDaysLeft } = useTrial();
const isHomeRoute = location.pathname.startsWith("/home");
const isSpacesRoute = location.pathname === "/spaces";
const hideSidebar = isHomeRoute || isSpacesRoute;
const items = links.map((link) => (
<Link key={link.label} to={link.link} className={classes.link}>
@ -38,7 +40,7 @@ export function AppHeader() {
<>
<Group h="100%" px="md" justify="space-between" wrap={"nowrap"}>
<Group wrap="nowrap">
{!isHomeRoute && (
{!hideSidebar && (
<>
<Tooltip label={t("Sidebar toggle")}>
<SidebarToggle

View File

@ -73,13 +73,15 @@ export default function GlobalAppShell({
const isSettingsRoute = location.pathname.startsWith("/settings");
const isSpaceRoute = location.pathname.startsWith("/s/");
const isHomeRoute = location.pathname.startsWith("/home");
const isSpacesRoute = location.pathname === "/spaces";
const isPageRoute = location.pathname.includes("/p/");
const hideSidebar = isHomeRoute || isSpacesRoute;
return (
<AppShell
header={{ height: 45 }}
navbar={
!isHomeRoute && {
!hideSidebar && {
width: isSpaceRoute ? sidebarWidth : 300,
breakpoint: "sm",
collapsed: {
@ -100,7 +102,7 @@ export default function GlobalAppShell({
<AppShell.Header px="md" className={classes.header}>
<AppHeader />
</AppShell.Header>
{!isHomeRoute && (
{!hideSidebar && (
<AppShell.Navbar
className={classes.navbar}
withBorder={false}