From 493fa120e8fb19d451755bb25c47b134bc79e5ed Mon Sep 17 00:00:00 2001
From: BFlat
Date: Fri, 5 Jul 2024 21:11:37 +0700
Subject: [PATCH] updated typeform flow (#598)
---
.../StorytellerStudioCTA.tsx | 46 ++++++++++++-------
.../src/components/layout/TopNav/TopNav.tsx | 13 +++++-
.../fakeyou.com/src/v2/view/PageContainer.tsx | 5 ++
.../fakeyou.com/src/v2/view/nav/FooterNav.tsx | 8 ++++
.../PostlaunchLanding/CreatorTypeformPage.tsx | 38 +++++++++++++++
.../PostlaunchLanding/EmailSignUp.tsx | 9 +++-
6 files changed, 99 insertions(+), 20 deletions(-)
create mode 100644 packages/fakeyou.com/src/v2/view/pages/landing/storyteller/PostlaunchLanding/CreatorTypeformPage.tsx
diff --git a/packages/fakeyou.com/src/components/common/StorytellerStudioCTA/StorytellerStudioCTA.tsx b/packages/fakeyou.com/src/components/common/StorytellerStudioCTA/StorytellerStudioCTA.tsx
index 57cd60c09b..7249010eed 100644
--- a/packages/fakeyou.com/src/components/common/StorytellerStudioCTA/StorytellerStudioCTA.tsx
+++ b/packages/fakeyou.com/src/components/common/StorytellerStudioCTA/StorytellerStudioCTA.tsx
@@ -6,12 +6,9 @@ import EmailSignUp from "v2/view/pages/landing/storyteller/PostlaunchLanding/Ema
import ScrollingSceneCarousel from "v2/view/pages/landing/storyteller/PostlaunchLanding/ScrollingSceneCarousel";
import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";
import Panel from "../Panel";
+import { get } from "local-storage";
-interface StorytellerStudioCTAProps {
- // Define props here
-}
-
-const StorytellerStudioCTA = (props: StorytellerStudioCTAProps) => {
+const StorytellerStudioCTA = () => {
const { open } = useModal();
const openModal = () =>
open({
@@ -33,18 +30,33 @@ const StorytellerStudioCTA = (props: StorytellerStudioCTAProps) => {
and effortlessly produce movies in any style you envision.
diff --git a/packages/fakeyou.com/src/components/layout/TopNav/TopNav.tsx b/packages/fakeyou.com/src/components/layout/TopNav/TopNav.tsx
index 89dda652d3..ebe44191d7 100644
--- a/packages/fakeyou.com/src/components/layout/TopNav/TopNav.tsx
+++ b/packages/fakeyou.com/src/components/layout/TopNav/TopNav.tsx
@@ -66,6 +66,9 @@ export default function TopNav({
const isOnWaitlistSuccessPage = window.location.pathname.includes(
"/waitlist-next-steps"
);
+ const isOnCreatorOnboardingPage = window.location.pathname.includes(
+ "/creator-onboarding"
+ );
const { open } = useModal();
const openModal = () => open({ component: InferenceJobsModal });
@@ -204,7 +207,8 @@ export default function TopNav({
if (pageContentWrapper) {
if (
(domain.titlePart === "Storyteller AI" && isOnLandingPage) ||
- isOnBetaKeyRedeemPage
+ isOnBetaKeyRedeemPage ||
+ isOnCreatorOnboardingPage
) {
pageContentWrapper.style.padding = "0px";
} else {
@@ -216,6 +220,7 @@ export default function TopNav({
isOnLandingPage,
isOnBetaKeyRedeemPage,
isOnWaitlistSuccessPage,
+ isOnCreatorOnboardingPage,
]);
if (
@@ -250,7 +255,11 @@ export default function TopNav({
};
}, [domain.titlePart, isOnLandingPage, topBarWrapper]);
- if (isOnBetaKeyRedeemPage || isOnWaitlistSuccessPage) {
+ if (
+ isOnBetaKeyRedeemPage ||
+ isOnWaitlistSuccessPage ||
+ isOnCreatorOnboardingPage
+ ) {
return null;
}
diff --git a/packages/fakeyou.com/src/v2/view/PageContainer.tsx b/packages/fakeyou.com/src/v2/view/PageContainer.tsx
index 70f41661e5..9f3fc7189e 100644
--- a/packages/fakeyou.com/src/v2/view/PageContainer.tsx
+++ b/packages/fakeyou.com/src/v2/view/PageContainer.tsx
@@ -127,6 +127,7 @@ import { ProfilePageV3 } from "./pages/profile/profile_view/ProfilePageV3";
import ProfileSidePanel from "components/layout/ProfileSidePanel/ProfileSidePanel";
import CreatorToolsPage from "./pages/creator_tools/CreatorToolsPage";
import WaitlistNextStepsPage from "./pages/waitlist_next_steps/WaitlistNextStepsPage";
+import { CreatorTypeformPage } from "./pages/landing/storyteller/PostlaunchLanding/CreatorTypeformPage";
interface Props {
sessionWrapper: SessionWrapper;
@@ -944,6 +945,10 @@ class PageContainer extends React.Component<
/>
+
+
+
+
diff --git a/packages/fakeyou.com/src/v2/view/nav/FooterNav.tsx b/packages/fakeyou.com/src/v2/view/nav/FooterNav.tsx
index e0fbabb79d..4c3b09ca2c 100644
--- a/packages/fakeyou.com/src/v2/view/nav/FooterNav.tsx
+++ b/packages/fakeyou.com/src/v2/view/nav/FooterNav.tsx
@@ -135,6 +135,14 @@ function FooterNav(props: Props) {
},
];
+ const isOnCreatorOnboardingPage = window.location.pathname.includes(
+ "/creator-onboarding"
+ );
+
+ if (isOnCreatorOnboardingPage) {
+ return null;
+ }
+
return (
<>
{!isOnStudioPage && (
diff --git a/packages/fakeyou.com/src/v2/view/pages/landing/storyteller/PostlaunchLanding/CreatorTypeformPage.tsx b/packages/fakeyou.com/src/v2/view/pages/landing/storyteller/PostlaunchLanding/CreatorTypeformPage.tsx
new file mode 100644
index 0000000000..157b4731d0
--- /dev/null
+++ b/packages/fakeyou.com/src/v2/view/pages/landing/storyteller/PostlaunchLanding/CreatorTypeformPage.tsx
@@ -0,0 +1,38 @@
+import React from "react";
+import { Widget } from "@typeform/embed-react";
+import { useLocation } from "react-router-dom";
+import { useDomainConfig } from "context/DomainConfigContext";
+import { set } from "local-storage";
+
+export const CreatorTypeformPage = () => {
+ const location = useLocation();
+ const queryParams = new URLSearchParams(location.search);
+ const email = queryParams.get("email");
+ const domain = useDomainConfig();
+
+ const formId = "ZQTkv9ha";
+
+ const fullFormUrl = `${formId}?${
+ domain.titlePart === "FakeYou"
+ ? "typeform-source=fakeyou.com"
+ : "typeform-source=storyteller.ai"
+ }&email=${encodeURIComponent(email || "")}`;
+
+ return (
+
+ {
+ set("secondFormIsSubmitted", true);
+ }}
+ id={fullFormUrl}
+ className="h-100"
+ />
+
+ );
+};
diff --git a/packages/fakeyou.com/src/v2/view/pages/landing/storyteller/PostlaunchLanding/EmailSignUp.tsx b/packages/fakeyou.com/src/v2/view/pages/landing/storyteller/PostlaunchLanding/EmailSignUp.tsx
index ba79c3c01b..38f0b55f05 100644
--- a/packages/fakeyou.com/src/v2/view/pages/landing/storyteller/PostlaunchLanding/EmailSignUp.tsx
+++ b/packages/fakeyou.com/src/v2/view/pages/landing/storyteller/PostlaunchLanding/EmailSignUp.tsx
@@ -1,6 +1,7 @@
import React, { useState } from "react";
import { Widget } from "@typeform/embed-react";
import ModalHeader from "components/modals/ModalHeader";
+import { set } from "local-storage";
interface EmailSignUpProps {
mobile?: boolean;
@@ -55,7 +56,13 @@ export default function EmailSignUp({
/>
)}
-
+
{
+ set("firstFormIsSubmitted", true);
+ }}
+ id="TKSc5ImN"
+ style={{ width: "100%", height: "300px" }}
+ />
);