Skip to content

Commit

Permalink
feat: don't show sidebar by default for non-logged in user (#3576)
Browse files Browse the repository at this point in the history
  • Loading branch information
zeucapua committed Jun 18, 2024
1 parent aed7421 commit 6f440ca
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions components/Workspaces/WorkspaceLayout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,11 @@ interface WorkspaceLayoutProps {
}

export const WorkspaceLayout = ({ workspaceId, banner, children, footer }: WorkspaceLayoutProps) => {
const { user } = useSupabaseAuth();
const isLargeScreen = useMediaQuery("(min-width: 1024px)");
const [showingSidebar, setShowingSidebar] = useLocalStorage("showingSidebar", isLargeScreen);
const [showingSidebar, setShowingSidebar] = useLocalStorage("showingSidebar", !user ? false : isLargeScreen);
const hideSidebar = () => setShowingSidebar(false);
const sidebarRef = useRef<HTMLSpanElement | null>(null);
const { user } = useSupabaseAuth();
const [showingSignupNudge, setShowingSignupNudge] = useState(true);

useOutsideClick(
Expand Down

0 comments on commit 6f440ca

Please sign in to comment.