Skip to content

Commit

Permalink
trim button text for microsoft (#99)
Browse files Browse the repository at this point in the history
* trim button text for microsoft

* update buttonText to check length
  • Loading branch information
nicklloyd authored Mar 29, 2024
1 parent 1183c34 commit 9b97951
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/components/AuthorizeButton.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -129,9 +129,14 @@ const AuthorizeButton = ({ connection, onConnectionChange }: Props) => {
);
}

const buttonText =
typeof connection?.service_id === 'string' &&
connection?.service_id.length > 15
? t('Authorize')
: `${t('Authorize')} ${connection.name}`;
return (
<Button
text={`${t('Authorize')} ${connection.name}`}
text={buttonText}
isLoading={isLoading}
disabled={
connection.integration_state === 'needs_configuration' || isLoading
Expand Down

0 comments on commit 9b97951

Please sign in to comment.