diff --git a/app/client/src/ce/AppRouter.tsx b/app/client/src/ce/AppRouter.tsx index 628d1654a4..cbfd14f1ef 100644 --- a/app/client/src/ce/AppRouter.tsx +++ b/app/client/src/ce/AppRouter.tsx @@ -204,12 +204,12 @@ function AppRouter(props: { ); } -const mapStateToProps = (state: AppState) => ({ +export const mapStateToProps = (state: AppState) => ({ safeCrash: getSafeCrash(state), safeCrashCode: getSafeCrashCode(state), }); -const mapDispatchToProps = (dispatch: any) => ({ +export const mapDispatchToProps = (dispatch: any) => ({ getCurrentUser: () => dispatch(getCurrentUser()), getFeatureFlags: () => dispatch(fetchFeatureFlagsInit()), getCurrentTenant: () => dispatch(getCurrentTenant(false)), diff --git a/app/client/src/ce/pages/Applications/index.tsx b/app/client/src/ce/pages/Applications/index.tsx index 902cd592c0..78afbd51d6 100644 --- a/app/client/src/ce/pages/Applications/index.tsx +++ b/app/client/src/ce/pages/Applications/index.tsx @@ -849,7 +849,7 @@ export class Applications< } } -const mapStateToProps = (state: AppState) => ({ +export const mapStateToProps = (state: AppState) => ({ applicationList: getApplicationList(state), isFetchingApplications: getIsFetchingApplications(state), isCreatingApplication: getIsCreatingApplication(state), @@ -860,7 +860,7 @@ const mapStateToProps = (state: AppState) => ({ searchKeyword: getApplicationSearchKeyword(state), }); -const mapDispatchToProps = (dispatch: any) => ({ +export const mapDispatchToProps = (dispatch: any) => ({ getAllApplication: () => { dispatch({ type: ReduxActionTypes.GET_ALL_APPLICATION_INIT }); }, diff --git a/app/client/src/ce/pages/workspace/WorkspaceInviteUsersForm.tsx b/app/client/src/ce/pages/workspace/WorkspaceInviteUsersForm.tsx index 1723a63bfe..5524d86097 100644 --- a/app/client/src/ce/pages/workspace/WorkspaceInviteUsersForm.tsx +++ b/app/client/src/ce/pages/workspace/WorkspaceInviteUsersForm.tsx @@ -718,23 +718,28 @@ function WorkspaceInviteUsersForm(props: any) { ); } +export const mapStateToProps = ( + state: AppState, + { formName }: { formName?: string }, +) => ({ + roles: getRolesForField(state), + allUsers: getAllUsers(state), + isLoading: state.ui.workspaces.loadingStates.isFetchAllUsers, + form: formName || INVITE_USERS_TO_WORKSPACE_FORM, +}); + +export const mapDispatchToProps = (dispatch: any) => ({ + fetchAllRoles: (workspaceId: string) => + dispatch(fetchRolesForWorkspace(workspaceId)), + fetchCurrentWorkspace: (workspaceId: string) => + dispatch(fetchWorkspace(workspaceId)), + fetchUser: (workspaceId: string) => + dispatch(fetchUsersForWorkspace(workspaceId)), +}); + export default connect( - (state: AppState, { formName }: { formName?: string }) => { - return { - roles: getRolesForField(state), - allUsers: getAllUsers(state), - isLoading: state.ui.workspaces.loadingStates.isFetchAllUsers, - form: formName || INVITE_USERS_TO_WORKSPACE_FORM, - }; - }, - (dispatch: any) => ({ - fetchAllRoles: (workspaceId: string) => - dispatch(fetchRolesForWorkspace(workspaceId)), - fetchCurrentWorkspace: (workspaceId: string) => - dispatch(fetchWorkspace(workspaceId)), - fetchUser: (workspaceId: string) => - dispatch(fetchUsersForWorkspace(workspaceId)), - }), + mapStateToProps, + mapDispatchToProps, )( reduxForm< InviteUsersToWorkspaceFormValues, diff --git a/app/client/src/components/common/Card.tsx b/app/client/src/components/common/Card.tsx index 0a1a50dff1..663c29aaa0 100644 --- a/app/client/src/components/common/Card.tsx +++ b/app/client/src/components/common/Card.tsx @@ -102,7 +102,12 @@ const CircleAppIcon = styled(AppIcon)` const NameWrapper = styled((props: HTMLDivProps & NameWrapperProps) => (
))` .bp3-card {