From 95b51ca2e160bf835aafb770e0a11b8ad0fc5858 Mon Sep 17 00:00:00 2001 From: moonrailgun Date: Sat, 14 Sep 2024 22:24:21 +0800 Subject: [PATCH] chore: fix ci problem and remove unused code --- src/client/components/WorkspaceSwitcher.tsx | 46 +------------------ .../components/layout/DesktopLayout.tsx | 2 +- src/server/tests/utils.ts | 4 +- 3 files changed, 4 insertions(+), 48 deletions(-) diff --git a/src/client/components/WorkspaceSwitcher.tsx b/src/client/components/WorkspaceSwitcher.tsx index 009994d..6f4a41c 100644 --- a/src/client/components/WorkspaceSwitcher.tsx +++ b/src/client/components/WorkspaceSwitcher.tsx @@ -192,7 +192,7 @@ export const WorkspaceSwitcher: React.FC = React.memo( = React.memo( ); - - // return ( - // - // ); } ); WorkspaceSwitcher.displayName = 'WorkspaceSwitcher'; diff --git a/src/client/components/layout/DesktopLayout.tsx b/src/client/components/layout/DesktopLayout.tsx index f7c12c4..335704c 100644 --- a/src/client/components/layout/DesktopLayout.tsx +++ b/src/client/components/layout/DesktopLayout.tsx @@ -39,7 +39,7 @@ export const DesktopLayout: React.FC = React.memo((props) => { defaultValue: false, } ); - const workspaceId = useUserStore((state) => state.info?.currentWorkspace?.id); + const workspaceId = useUserStore((state) => state.info?.currentWorkspaceId); const { data: serviceCount } = trpc.workspace.getServiceCount.useQuery( { workspaceId: workspaceId!, diff --git a/src/server/tests/utils.ts b/src/server/tests/utils.ts index d2bb551..ef62601 100644 --- a/src/server/tests/utils.ts +++ b/src/server/tests/utils.ts @@ -24,13 +24,13 @@ export function createTestContext() { }); await prisma.workspace.delete({ - where: { id: data.currentWorkspace.id }, + where: { id: data.currentWorkspaceId! }, }); }); return { user: data, - workspace: data.currentWorkspace, + workspace: data.workspaces[0].workspace, }; };