Merge branch 'master' of github.com:appsmithorg/appsmith

This commit is contained in:
Nikhil Nandagopal 2020-10-12 21:33:04 +05:30
commit 83b73d391d
3 changed files with 5 additions and 4 deletions

View File

@ -15,6 +15,7 @@ import OrgInviteUsersForm from "./OrgInviteUsersForm";
import { getCurrentUser } from "selectors/usersSelectors";
import Text, { TextType } from "components/ads/Text";
import Toggle from "components/ads/Toggle";
import { ANONYMOUS_USERNAME } from "constants/userConstants";
const Title = styled.div`
padding: 10px 0px;
@ -65,7 +66,7 @@ const AppInviteUsersForm = (props: any) => {
};
useEffect(() => {
if (currentUser.name !== "anonymousUser") {
if (currentUser.name !== ANONYMOUS_USERNAME) {
fetchCurrentOrg(props.orgId);
}
}, [props.orgId, fetchCurrentOrg, currentUser.name]);

View File

@ -36,6 +36,7 @@ import { INVITE_USERS_TO_ORG_FORM } from "constants/forms";
import PerformanceTracker, {
PerformanceTransactionName,
} from "utils/PerformanceTracker";
import { ANONYMOUS_USERNAME } from "constants/userConstants";
export function* createUserSaga(
action: ReduxActionWithPromise<CreateUserRequest>,
@ -83,7 +84,7 @@ export function* getCurrentUserSaga() {
const response: ApiResponse = yield call(UserApi.getCurrentUser);
const isValidResponse = yield validateResponse(response);
if (isValidResponse) {
if (isValidResponse && response.data.username !== ANONYMOUS_USERNAME) {
AnalyticsUtil.identifyUser(response.data.username, response.data);
if (window.location.pathname === BASE_URL) {
if (response.data.isAnonymous) {

View File

@ -185,9 +185,8 @@ class AnalyticsUtil {
}
if (windowDoc.analytics) {
windowDoc.analytics.track(eventName, finalEventData);
} else {
log.debug("Event fired", eventName, finalEventData);
}
log.debug("Event fired", eventName, finalEventData);
}
static identifyUser(userId: string, userData: User) {