chore: fix ci problem and remove unused code
This commit is contained in:
parent
6ce2f7fd4d
commit
95b51ca2e1
@ -192,7 +192,7 @@ export const WorkspaceSwitcher: React.FC<WorkspaceSwitcherProps> = React.memo(
|
|||||||
<CheckIcon
|
<CheckIcon
|
||||||
className={cn(
|
className={cn(
|
||||||
'ml-auto h-4 w-4',
|
'ml-auto h-4 w-4',
|
||||||
currentWorkspace.id === workspace.id
|
currentWorkspace?.id === workspace.id
|
||||||
? 'opacity-100'
|
? 'opacity-100'
|
||||||
: 'opacity-0'
|
: 'opacity-0'
|
||||||
)}
|
)}
|
||||||
@ -259,50 +259,6 @@ export const WorkspaceSwitcher: React.FC<WorkspaceSwitcherProps> = React.memo(
|
|||||||
</DialogContent>
|
</DialogContent>
|
||||||
</Dialog>
|
</Dialog>
|
||||||
);
|
);
|
||||||
|
|
||||||
// return (
|
|
||||||
// <Select value={userInfo.currentWorkspace.id}>
|
|
||||||
// <SelectTrigger
|
|
||||||
// className={cn(
|
|
||||||
// 'flex items-center gap-2 [&>span]:line-clamp-1 [&>span]:flex [&>span]:w-full [&>span]:items-center [&>span]:gap-1 [&>span]:truncate [&_svg]:h-4 [&_svg]:w-4 [&_svg]:shrink-0',
|
|
||||||
// props.isCollapsed &&
|
|
||||||
// 'flex h-9 w-9 shrink-0 items-center justify-center p-0 [&>span]:w-auto [&>svg]:hidden'
|
|
||||||
// )}
|
|
||||||
// aria-label="Select workspace"
|
|
||||||
// >
|
|
||||||
// <SelectValue placeholder="Select workspace">
|
|
||||||
// <RiRocket2Fill />
|
|
||||||
|
|
||||||
// <span className={cn('ml-2', props.isCollapsed && 'hidden')}>
|
|
||||||
// {userInfo.currentWorkspace.name}
|
|
||||||
// </span>
|
|
||||||
// </SelectValue>
|
|
||||||
// </SelectTrigger>
|
|
||||||
// <SelectContent>
|
|
||||||
// {userInfo.workspaces.map((w) => (
|
|
||||||
// <SelectItem key={w.workspace.id} value={w.workspace.id}>
|
|
||||||
// <div className="[&_svg]:text-foreground flex items-center gap-3 [&_svg]:h-4 [&_svg]:w-4 [&_svg]:shrink-0">
|
|
||||||
// <RiRocket2Fill />
|
|
||||||
// {w.workspace.name}
|
|
||||||
// </div>
|
|
||||||
// </SelectItem>
|
|
||||||
// ))}
|
|
||||||
|
|
||||||
// <SelectSeparator />
|
|
||||||
|
|
||||||
// <SelectItem
|
|
||||||
// value="create"
|
|
||||||
// onClick={() => console.log('aa')}
|
|
||||||
// onSelect={() => console.log('bbb')}
|
|
||||||
// >
|
|
||||||
// <div className="[&_svg]:text-foreground flex items-center gap-3 [&_svg]:h-4 [&_svg]:w-4 [&_svg]:shrink-0">
|
|
||||||
// <LuPlus />
|
|
||||||
// {t('Create Workspace')}
|
|
||||||
// </div>
|
|
||||||
// </SelectItem>
|
|
||||||
// </SelectContent>
|
|
||||||
// </Select>
|
|
||||||
// );
|
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
WorkspaceSwitcher.displayName = 'WorkspaceSwitcher';
|
WorkspaceSwitcher.displayName = 'WorkspaceSwitcher';
|
||||||
|
@ -39,7 +39,7 @@ export const DesktopLayout: React.FC<LayoutProps> = React.memo((props) => {
|
|||||||
defaultValue: false,
|
defaultValue: false,
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
const workspaceId = useUserStore((state) => state.info?.currentWorkspace?.id);
|
const workspaceId = useUserStore((state) => state.info?.currentWorkspaceId);
|
||||||
const { data: serviceCount } = trpc.workspace.getServiceCount.useQuery(
|
const { data: serviceCount } = trpc.workspace.getServiceCount.useQuery(
|
||||||
{
|
{
|
||||||
workspaceId: workspaceId!,
|
workspaceId: workspaceId!,
|
||||||
|
@ -24,13 +24,13 @@ export function createTestContext() {
|
|||||||
});
|
});
|
||||||
|
|
||||||
await prisma.workspace.delete({
|
await prisma.workspace.delete({
|
||||||
where: { id: data.currentWorkspace.id },
|
where: { id: data.currentWorkspaceId! },
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
return {
|
return {
|
||||||
user: data,
|
user: data,
|
||||||
workspace: data.currentWorkspace,
|
workspace: data.workspaces[0].workspace,
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user