refactor: Simplify AuthField component by removing TooltipAnchor and directly rendering Label

This commit is contained in:
Marco Beretta 2025-12-02 23:01:15 +01:00
parent 2aeff5e2f2
commit 99b69c5b81
No known key found for this signature in database
GPG key ID: D918033D8E74CC11
2 changed files with 3 additions and 13 deletions

View file

@ -60,18 +60,9 @@ function AuthField({ name, config, hasValue, control, errors }: AuthFieldProps)
return (
<div className="space-y-2">
<div className="flex items-center justify-between">
<TooltipAnchor
enableHTML={true}
description={config.description || ''}
render={
<div className="flex items-center gap-2">
<Label htmlFor={name} className="text-sm font-medium">
{config.title} <span className="sr-only">({statusText})</span>
</Label>
<CircleHelpIcon className="h-6 w-6 cursor-help text-text-secondary transition-colors hover:text-text-primary" />
</div>
}
/>
<Label htmlFor={name} className="text-sm font-medium">
{config.title} <span className="sr-only">({statusText})</span>
</Label>
<div aria-hidden="true">
{hasValue ? (
<div className="flex min-w-fit items-center gap-2 whitespace-nowrap rounded-full border border-border-light px-2 py-0.5 text-xs font-medium text-text-secondary">

View file

@ -132,7 +132,6 @@ export default function FavoritesList({
permission: Permissions.USE,
});
// Show agent marketplace when marketplace permission is enabled, and user has access to agents
const showAgentMarketplace = hasAccessToAgents && hasAccessToMarketplace;
const handleAgentMarketplace = useCallback(() => {