diff --git a/app/components/layout/sidebar/bottom.tsx b/app/components/layout/sidebar/bottom.tsx
index 2e7295f3d..b27430898 100644
--- a/app/components/layout/sidebar/bottom.tsx
+++ b/app/components/layout/sidebar/bottom.tsx
@@ -1,6 +1,8 @@
import { useState } from "react";
import type { User } from "@prisma/client";
import { Form } from "@remix-run/react";
+import { useAtom } from "jotai";
+import { switchingWorkspaceAtom } from "~/atoms/switching-workspace";
import { ChevronRight, QuestionsIcon } from "~/components/icons";
import { CrispButton } from "~/components/marketing/crisp";
import { Button } from "~/components/shared";
@@ -20,9 +22,15 @@ interface Props {
export default function SidebarBottom({ user }: Props) {
const [dropdownOpen, setDropdownOpen] = useState(false);
+ const [workspaceSwitching] = useAtom(switchingWorkspaceAtom);
return (
-
+
setDropdownOpen((prev) => !prev)}
diff --git a/app/components/layout/sidebar/menu-items.tsx b/app/components/layout/sidebar/menu-items.tsx
index 530a53221..6681a5c4c 100644
--- a/app/components/layout/sidebar/menu-items.tsx
+++ b/app/components/layout/sidebar/menu-items.tsx
@@ -2,6 +2,7 @@ import type { FetcherWithComponents } from "@remix-run/react";
import { NavLink, useLoaderData, useLocation } from "@remix-run/react";
import { motion } from "framer-motion";
import { useAtom } from "jotai";
+import { switchingWorkspaceAtom } from "~/atoms/switching-workspace";
import { SwitchIcon } from "~/components/icons/library";
import { ControlledActionButton } from "~/components/shared/controlled-action-button";
import { useMainMenuItems } from "~/hooks/use-main-menu-items";
@@ -18,6 +19,7 @@ const MenuItems = ({ fetcher }: { fetcher: FetcherWithComponents }) => {
const location = useLocation();
/** We need to do this becasue of a special way we handle the bookings link that doesnt allow us to use NavLink currently */
const isBookingsRoute = location.pathname.includes("/bookings");
+ const [workspaceSwitching] = useAtom(switchingWorkspaceAtom);
return (