diff --git a/app/client/src/configs/index.ts b/app/client/src/configs/index.ts
index 133d5ad60c4c..6bc8a12edf16 100644
--- a/app/client/src/configs/index.ts
+++ b/app/client/src/configs/index.ts
@@ -43,7 +43,6 @@ export type INJECTED_CONFIGS = {
disableTelemetry: boolean;
cloudServicesBaseUrl: string;
googleRecaptchaSiteKey: string;
- onboardingFormEnabled: boolean;
supportEmail: string;
};
declare global {
@@ -120,7 +119,6 @@ const getConfigsFromEnvVars = (): INJECTED_CONFIGS => {
cloudServicesBaseUrl: process.env.REACT_APP_CLOUD_SERVICES_BASE_URL || "",
googleRecaptchaSiteKey:
process.env.REACT_APP_GOOGLE_RECAPTCHA_SITE_KEY || "",
- onboardingFormEnabled: !!process.env.REACT_APP_SHOW_ONBOARDING_FORM,
supportEmail: process.env.APPSMITH_SUPPORT_EMAIL || "support@appsmith.com",
};
};
@@ -285,7 +283,6 @@ export const getAppsmithConfigs = (): AppsmithUIConfigs => {
cloudServicesBaseUrl:
ENV_CONFIG.cloudServicesBaseUrl ||
APPSMITH_FEATURE_CONFIGS.cloudServicesBaseUrl,
- onboardingFormEnabled: ENV_CONFIG.onboardingFormEnabled,
appsmithSupportEmail: ENV_CONFIG.supportEmail,
};
};
diff --git a/app/client/src/configs/types.ts b/app/client/src/configs/types.ts
index 71b4e71c2f1c..21459345eaac 100644
--- a/app/client/src/configs/types.ts
+++ b/app/client/src/configs/types.ts
@@ -77,6 +77,5 @@ export type AppsmithUIConfigs = {
enabled: boolean;
apiKey: string;
};
- onboardingFormEnabled: boolean;
appsmithSupportEmail: string;
};
diff --git a/app/client/src/pages/Applications/OnboardingForm.tsx b/app/client/src/pages/Applications/OnboardingForm.tsx
deleted file mode 100644
index f573d62b103b..000000000000
--- a/app/client/src/pages/Applications/OnboardingForm.tsx
+++ /dev/null
@@ -1,43 +0,0 @@
-import React, { useEffect } from "react";
-import { useSelector } from "react-redux";
-import { useScript, ScriptStatus } from "utils/hooks/useScript";
-import { getCurrentUser } from "selectors/usersSelectors";
-import styled from "styled-components";
-import { setOnboardingFormInProgress } from "utils/storage";
-
-export const TypeformContainer = styled.div`
- & iframe {
- position: absolute;
- left: 0;
- right: 0;
- bottom: 0;
- top: 0;
- border: 0;
- }
-`;
-
-function OnboardingForm() {
- const status = useScript(`https://embed.typeform.com/embed.js`);
- const currentUser = useSelector(getCurrentUser);
-
- useEffect(() => {
- setOnboardingFormInProgress(true);
- }, []);
-
- if (status !== ScriptStatus.READY || !currentUser) return null;
-
- return (
-
-
-
- );
-}
-
-export default OnboardingForm;
diff --git a/app/client/src/pages/Applications/index.tsx b/app/client/src/pages/Applications/index.tsx
index f5292b98fd9b..12d4ed9f2131 100644
--- a/app/client/src/pages/Applications/index.tsx
+++ b/app/client/src/pages/Applications/index.tsx
@@ -80,13 +80,7 @@ import AnalyticsUtil from "utils/AnalyticsUtil";
import { createOrganizationSubmitHandler } from "../organization/helpers";
import UserApi from "api/UserApi";
import ImportApplicationModal from "./ImportApplicationModal";
-import OnboardingForm from "./OnboardingForm";
-import { getAppsmithConfigs } from "configs";
import { SIGNUP_SUCCESS_URL } from "constants/routes";
-import {
- setOnboardingFormInProgress,
- getOnboardingFormInProgress,
-} from "utils/storage";
import { getIsSafeRedirectURL } from "utils/helpers";
@@ -899,7 +893,6 @@ const getIsFromSignup = () => {
return window.location?.pathname === SIGNUP_SUCCESS_URL;
};
-const { onboardingFormEnabled } = getAppsmithConfigs();
class Applications extends Component<
ApplicationProps,
{ selectedOrgId: string; showOnboardingForm: boolean }
@@ -916,29 +909,12 @@ class Applications extends Component<
componentDidMount() {
PerformanceTracker.stopTracking(PerformanceTransactionName.LOGIN_CLICK);
PerformanceTracker.stopTracking(PerformanceTransactionName.SIGN_UP);
- this.props.getAllApplication();
- window.addEventListener("message", this.handleTypeFormMessage, false);
- this.showOnboardingForm();
- }
-
- componentWillUnmount() {
- window.removeEventListener("message", this.handleTypeFormMessage);
- }
-
- showOnboardingForm = async () => {
const isFromSignUp = getIsFromSignup();
- const isOnboardingFormInProgress = await getOnboardingFormInProgress();
- const showOnboardingForm =
- onboardingFormEnabled && (isFromSignUp || isOnboardingFormInProgress);
- this.setState({
- showOnboardingForm: !!showOnboardingForm,
- });
-
- // Redirect directly in case we're not showing the onboarding form
- if (isFromSignUp && !onboardingFormEnabled) {
+ if (isFromSignUp) {
this.redirectUsingQueryParam();
}
- };
+ this.props.getAllApplication();
+ }
redirectUsingQueryParam = () => {
const urlObject = new URL(window.location.href);
@@ -954,32 +930,19 @@ class Applications extends Component<
}
};
- handleTypeFormMessage = (event: any) => {
- if (event?.data?.type === "form-submit" && this.state.showOnboardingForm) {
- setOnboardingFormInProgress();
- this.redirectUsingQueryParam();
- }
- };
-
public render() {
return (
- {this.state.showOnboardingForm ? (
-
- ) : (
- <>
-
-
-
-
- >
- )}
+
+
+
+
);
}
diff --git a/app/client/src/utils/storage.ts b/app/client/src/utils/storage.ts
index 957e51176599..8421713ae68a 100644
--- a/app/client/src/utils/storage.ts
+++ b/app/client/src/utils/storage.ts
@@ -207,26 +207,3 @@ export const getCommentsIntroSeen = async () => {
log.error(error);
}
};
-
-export const setOnboardingFormInProgress = async (flag?: boolean) => {
- try {
- await store.setItem(STORAGE_KEYS.ONBOARDING_FORM_IN_PROGRESS, flag);
- return true;
- } catch (error) {
- log.error("An error occurred when setting ONBOARDING_FORM_IN_PROGRESS");
- log.error(error);
- return false;
- }
-};
-
-export const getOnboardingFormInProgress = async () => {
- try {
- const onboardingFormInProgress = await store.getItem(
- STORAGE_KEYS.ONBOARDING_FORM_IN_PROGRESS,
- );
- return onboardingFormInProgress;
- } catch (error) {
- log.error("An error occurred while fetching ONBOARDING_FORM_IN_PROGRESS");
- log.error(error);
- }
-};