CB-2904 select shared connection by default (#1373)

This commit is contained in:
alex
2022-12-21 19:23:12 +01:00
committed by GitHub
parent fc83ba7805
commit f74bbc91a4
@@ -33,8 +33,10 @@ export const CustomConnection = observer(function CustomConnection() {
useMapResource(CustomConnection, ProjectInfoResource, CachedMapAllKey);
function select(driverId: string) {
if (projectsService.activeProjects.length > 0) {
connectionManualService.select(projectsService.activeProjects[0].id, driverId);
const shared = projectsService.activeProjects.filter(project => project.shared);
if (shared.length > 0) {
connectionManualService.select(shared[0].id, driverId);
} else {
notificationService.logError({
title: 'core_projects_no_default_project',