From aa590078deb30b1a7eb7bb5aa59e96472ebf1b0b Mon Sep 17 00:00:00 2001 From: Henry Date: Sat, 16 Mar 2024 11:43:49 +0000 Subject: [PATCH] feat: switch workspace --- src/app/components/SideNavigation.tsx | 19 ++------- src/app/components/UserMenu.tsx | 8 ++-- src/app/components/WorkspaceMenu.tsx | 59 +++++++++++++++++++++++++++ src/app/providers/workspace.tsx | 48 ++++++++++++++++++---- 4 files changed, 106 insertions(+), 28 deletions(-) create mode 100644 src/app/components/WorkspaceMenu.tsx diff --git a/src/app/components/SideNavigation.tsx b/src/app/components/SideNavigation.tsx index 3afe89fc..994d00bf 100644 --- a/src/app/components/SideNavigation.tsx +++ b/src/app/components/SideNavigation.tsx @@ -8,8 +8,7 @@ import settingsIcon from "~/app/assets/settings.json"; import ReactiveButton from "~/app/components/ReactiveButton"; import UserMenu from "~/app/components/UserMenu"; - -import { useWorkspace } from "~/app/providers/workspace"; +import WorkspaceMenu from "~/app/components/WorkspaceMenu"; interface SideNavigationProps { user: UserType; @@ -22,7 +21,6 @@ interface UserType { export default function SideNavigation({ user }: SideNavigationProps) { const pathname = usePathname(); - const { workspace } = useWorkspace(); const navigation = [ { name: "Boards", href: "/boards", icon: boardsIcon }, @@ -35,19 +33,10 @@ export default function SideNavigation({ user }: SideNavigationProps) { ]; return ( -