🐛 (credentials) Fix credentials not listing when workspace has legacy zemantic
This commit is contained in:
@ -62,6 +62,8 @@ const CredentialsCreateModalContent = ({
|
||||
onClose={onClose}
|
||||
/>
|
||||
)
|
||||
case 'zemanticAi':
|
||||
return null
|
||||
default:
|
||||
return (
|
||||
<CreateForgedCredentialsModalContent
|
||||
|
@ -211,6 +211,8 @@ const CredentialsIcon = ({
|
||||
return <StripeLogo rounded="sm" {...props} />
|
||||
case 'whatsApp':
|
||||
return <WhatsAppLogo {...props} />
|
||||
case 'zemanticAi':
|
||||
return null
|
||||
default:
|
||||
return <BlockIcon type={type} {...props} />
|
||||
}
|
||||
@ -245,6 +247,8 @@ const CredentialsLabel = ({
|
||||
WhatsApp
|
||||
</Text>
|
||||
)
|
||||
case 'zemanticAi':
|
||||
return null
|
||||
default:
|
||||
return <BlockLabel type={type} {...props} />
|
||||
}
|
||||
|
@ -57,6 +57,7 @@ const CredentialsUpdateModalContent = ({
|
||||
onUpdate={onSubmit}
|
||||
/>
|
||||
)
|
||||
case 'zemanticAi':
|
||||
case 'whatsApp':
|
||||
return null
|
||||
default:
|
||||
|
@ -16,7 +16,7 @@ import {
|
||||
import React, { useState } from 'react'
|
||||
import { ZodObjectLayout } from '../zodLayouts/ZodObjectLayout'
|
||||
import { ForgedBlockDefinition } from '@typebot.io/forge-repository/types'
|
||||
import { Credentials } from '@typebot.io/schemas'
|
||||
import { CredentialsWithoutLegacy } from '@typebot.io/schemas'
|
||||
|
||||
type Props = {
|
||||
blockDef: ForgedBlockDefinition
|
||||
@ -87,11 +87,11 @@ export const CreateForgedCredentialsModalContent = ({
|
||||
if (!workspace || !blockDef.auth) return
|
||||
mutate({
|
||||
credentials: {
|
||||
type: blockDef.id as Credentials['type'],
|
||||
type: blockDef.id,
|
||||
workspaceId: workspace.id,
|
||||
name,
|
||||
data,
|
||||
} as Credentials,
|
||||
} as CredentialsWithoutLegacy,
|
||||
})
|
||||
}
|
||||
|
||||
|
@ -14,7 +14,7 @@ import {
|
||||
import React, { useEffect, useState } from 'react'
|
||||
import { ZodObjectLayout } from '../zodLayouts/ZodObjectLayout'
|
||||
import { ForgedBlockDefinition } from '@typebot.io/forge-repository/types'
|
||||
import { Credentials } from '@typebot.io/schemas'
|
||||
import { CredentialsWithoutLegacy } from '@typebot.io/schemas'
|
||||
|
||||
type Props = {
|
||||
credentialsId: string
|
||||
@ -76,7 +76,7 @@ export const UpdateForgedCredentialsModalContent = ({
|
||||
workspaceId: workspace.id,
|
||||
name,
|
||||
data,
|
||||
} as Credentials,
|
||||
} as CredentialsWithoutLegacy,
|
||||
})
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user