2022-08-24 12:16:32 +00:00
|
|
|
import { AppState } from "@appsmith/reducers";
|
2019-12-23 12:16:33 +00:00
|
|
|
import { User } from "constants/userConstants";
|
2021-03-29 15:47:22 +00:00
|
|
|
import { PropertyPanePositionConfig } from "reducers/uiReducers/usersReducer";
|
2019-12-23 12:16:33 +00:00
|
|
|
|
|
|
|
|
export const getCurrentUser = (state: AppState): User | undefined =>
|
2022-10-20 06:03:33 +00:00
|
|
|
state.ui?.users?.currentUser;
|
2023-02-07 09:23:15 +00:00
|
|
|
export const getCurrentUserLoading = (state: AppState): boolean =>
|
|
|
|
|
state.ui.users.loadingStates.fetchingUser;
|
2020-08-03 14:18:48 +00:00
|
|
|
export const getUserAuthError = (state: AppState): string =>
|
|
|
|
|
state.ui.users.error;
|
2020-06-17 10:19:56 +00:00
|
|
|
export const getUsers = (state: AppState): User[] => state.ui.users.users;
|
2021-03-29 15:47:22 +00:00
|
|
|
export const getProppanePreference = (
|
|
|
|
|
state: AppState,
|
|
|
|
|
): PropertyPanePositionConfig | undefined => state.ui.users.propPanePreferences;
|
2021-08-05 06:10:19 +00:00
|
|
|
export const getFeatureFlagsFetched = (state: AppState) =>
|
2022-04-07 17:57:32 +00:00
|
|
|
state.ui.users.featureFlag.isFetched;
|
|
|
|
|
|
|
|
|
|
export const selectFeatureFlags = (state: AppState) =>
|
|
|
|
|
state.ui.users.featureFlag.data;
|