Skip to content

Commit 618d1de

Browse files
removing ts-expect-errors
1 parent b41dbda commit 618d1de

File tree

2 files changed

+5
-12
lines changed

2 files changed

+5
-12
lines changed

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

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,8 @@ import {
1010
useDarkMode,
1111
} from '@mongodb-js/compass-components';
1212
import { AISignInImageBanner } from './ai-signin-banner-image';
13-
import {
14-
closeOptInModal,
15-
optIn,
16-
type AtlasOptInState,
17-
} from '../store/atlas-optin-reducer';
13+
import { closeOptInModal, optIn } from '../store/atlas-optin-reducer';
14+
import type { RootState } from '../store/atlas-ai-store';
1815

1916
const GEN_AI_FAQ_LINK = 'https://www.mongodb.com/docs/generative-ai-faq/';
2017

@@ -101,11 +98,9 @@ const AIOptInModal: React.FunctionComponent<OptInModalProps> = ({
10198
};
10299

103100
export default connect(
104-
(state: AtlasOptInState) => {
101+
(state: RootState) => {
105102
return {
106-
// @ts-expect-error reducers were combined so these methods are nested one layer lower
107103
isOptInModalVisible: state.optIn.isModalOpen,
108-
// @ts-expect-error reducers were combined so these methods are nested one layer lower
109104
isOptInInProgress: state.optIn.state === 'in-progress',
110105
};
111106
},

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

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,8 @@ import {
1111
useDarkMode,
1212
} from '@mongodb-js/compass-components';
1313
import { AISignInImageBanner } from './ai-signin-banner-image';
14-
import type { AtlasSignInState } from '../store/atlas-signin-reducer';
1514
import { closeSignInModal, signIn } from '../store/atlas-signin-reducer';
15+
import type { RootState } from '../store/atlas-ai-store';
1616

1717
const GEN_AI_FAQ_LINK = 'https://www.mongodb.com/docs/generative-ai-faq/';
1818

@@ -100,11 +100,9 @@ const AISignInModal: React.FunctionComponent<SignInModalProps> = ({
100100
};
101101

102102
export default connect(
103-
(state: AtlasSignInState) => {
103+
(state: RootState) => {
104104
return {
105-
// @ts-expect-error reducers were combined so these methods are nested one layer lower
106105
isSignInModalVisible: state.signIn.isModalOpen,
107-
// @ts-expect-error reducers were combined so these methods are nested one layer lower
108106
isSignInInProgress: state.signIn.state === 'in-progress',
109107
};
110108
},

0 commit comments

Comments
 (0)