Skip to content

Commit 5c0f979

Browse files
authored
fix(frontend): Remove double title on credentials input (#8638)
- Add condition to hide `credentials` input title in `CustomNode:generateInputHandles` - Add `title={schema.description}` to `<CredentialsInput>` title element
1 parent b048385 commit 5c0f979

File tree

2 files changed

+14
-9
lines changed

2 files changed

+14
-9
lines changed

autogpt_platform/frontend/src/components/CustomNode.tsx

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -225,14 +225,14 @@ export function CustomNode({
225225
side="left"
226226
/>
227227
) : (
228-
<span
229-
className="text-m green mb-0 text-gray-900"
230-
title={propSchema.description}
231-
>
232-
{propKey == "credentials"
233-
? "Credentials"
234-
: propSchema.title || beautifyString(propKey)}
235-
</span>
228+
propKey != "credentials" && (
229+
<span
230+
className="text-m green mb-0 text-gray-900"
231+
title={propSchema.description}
232+
>
233+
{propSchema.title || beautifyString(propKey)}
234+
</span>
235+
)
236236
)}
237237
{!isConnected && (
238238
<NodeGenericInputField

autogpt_platform/frontend/src/components/integrations/credentials-input.tsx

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -234,7 +234,12 @@ export const CredentialsInput: FC<{
234234
if (savedApiKeys.length === 0 && savedOAuthCredentials.length === 0) {
235235
return (
236236
<>
237-
<span className="text-m green mb-0 text-gray-900">Credentials</span>
237+
<span
238+
className="text-m green mb-0 text-gray-900"
239+
title={schema.description}
240+
>
241+
Credentials
242+
</span>
238243
<div className={cn("flex flex-row space-x-2", className)}>
239244
{supportsOAuth2 && (
240245
<Button onClick={handleOAuthLogin}>

0 commit comments

Comments
 (0)