Skip to content

armgit / macro

Public Imported from GitHub
0

Macro is a unified workspace for teams: email, chat, docs, tasks, agents, calls, and CRM — @-linked together with shared AI memory.

fix(layout): hide sidebar when not authenticated (#1876)

dev-rb407d5ba5e273
diff --git a/js/app/packages/app/component/Layout.tsx b/js/app/packages/app/component/Layout.tsx
index e55384ea0c..4de31a5e0f 100644
--- a/js/app/packages/app/component/Layout.tsx
+++ b/js/app/packages/app/component/Layout.tsx
@@ -131,17 +131,19 @@ export function Layout(props: RouteSectionProps) {
<Paywall />
</Show>
<div class="max-h-full grow-1 flex">
- <AppSidebar
- sidebarState={sidebarState()}
- onOpenChange={(open) => {
- if (!open) {
- setSidebarState(isMobile() ? 'hidden' : 'slim');
- return;
- }
+ <Show when={isAuthenticated()}>
+ <AppSidebar
+ sidebarState={sidebarState()}
+ onOpenChange={(open) => {
+ if (!open) {
+ setSidebarState(isMobile() ? 'hidden' : 'slim');
+ return;
+ }
- setSidebarState('expanded');
- }}
- />
+ setSidebarState('expanded');
+ }}
+ />
+ </Show>
<Resize.Zone
gutter={4}