Skip to content

Commit a6e2b75

Browse files
committed
fix: support in progress case in both
1 parent b3f2aea commit a6e2b75

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

packages/compass-generative-ai/src/components/ai-optin-modal.tsx

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -46,17 +46,15 @@ const disableOptInButtonStyles = css({
4646

4747
const getButtonText = ({
4848
isOptInInProgress,
49-
isCloudOptIn,
5049
darkMode,
5150
}: {
5251
isOptInInProgress: boolean;
53-
isCloudOptIn: boolean;
5452
darkMode: boolean | undefined;
5553
}) => {
5654
return (
5755
<>
5856
Opt-in AI features
59-
{isOptInInProgress && isCloudOptIn && (
57+
{isOptInInProgress && (
6058
<>
6159
&nbsp;
6260
<SpinLoader darkMode={darkMode}></SpinLoader>
@@ -88,7 +86,7 @@ export const AIOptInModal: React.FunctionComponent<OptInModalProps> = ({
8886
}, [isOptInModalVisible, track]);
8987

9088
const onConfirmClick = () => {
91-
if ((isOptInInProgress && isCloudOptIn) || !isProjectAIEnabled) {
89+
if (isOptInInProgress || !isProjectAIEnabled) {
9290
return;
9391
}
9492
onOptInClick();
@@ -109,7 +107,6 @@ export const AIOptInModal: React.FunctionComponent<OptInModalProps> = ({
109107
// @ts-expect-error - buttonText expects a string but supports ReactNode as well.
110108
buttonText={getButtonText({
111109
isOptInInProgress,
112-
isCloudOptIn,
113110
darkMode,
114111
})}
115112
linkText="Not now"

0 commit comments

Comments
 (0)