feat: team & settings modal data sources tab revised

Signed-off-by: mertmit <mertmit99@gmail.com>
This commit is contained in:
mertmit
2022-09-25 16:43:16 +03:00
parent 121c4ed71c
commit 5c433e3086
22 changed files with 422 additions and 214 deletions

View File

@@ -68,19 +68,19 @@ const [setup, use] = useInjectionState(() => {
return temp
})
function getBaseType(baseId: string) {
function getBaseType(baseId?: string) {
return bases.value.find((base) => base.id === baseId)?.type || ClientType.MYSQL
}
function isMysql(baseId: string) {
function isMysql(baseId?: string) {
return ['mysql', ClientType.MYSQL].includes(getBaseType(baseId))
}
function isMssql(baseId: string) {
function isMssql(baseId?: string) {
return getBaseType(baseId) === 'mssql'
}
function isPg(baseId: string) {
function isPg(baseId?: string) {
return getBaseType(baseId) === 'pg'
}