Merge branch 'develop' into 'main'
AW-136-personal-video-to-trial-page See merge request witapp/aura-webapp!219
This commit is contained in:
commit
fc35fef6f2
@ -15,6 +15,7 @@ import { EPlacementKeys } from "@/api/resources/Paywall";
|
|||||||
import { getRandomArbitrary } from "@/services/random-value";
|
import { getRandomArbitrary } from "@/services/random-value";
|
||||||
import Loader from "@/components/Loader";
|
import Loader from "@/components/Loader";
|
||||||
import metricService, { EGoals } from "@/services/metric/metricService";
|
import metricService, { EGoals } from "@/services/metric/metricService";
|
||||||
|
import PersonalVideo from "../TrialPayment/components/PersonalVideo";
|
||||||
|
|
||||||
function TrialChoicePage() {
|
function TrialChoicePage() {
|
||||||
const dispatch = useDispatch();
|
const dispatch = useDispatch();
|
||||||
@ -29,6 +30,7 @@ function TrialChoicePage() {
|
|||||||
const { products, isLoading, getText } = usePaywall({
|
const { products, isLoading, getText } = usePaywall({
|
||||||
placementKey: EPlacementKeys["aura.placement.redesign.main"],
|
placementKey: EPlacementKeys["aura.placement.redesign.main"],
|
||||||
});
|
});
|
||||||
|
const { videoUrl } = useSelector(selectors.selectPersonalVideo);
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
const randomDelay = getRandomArbitrary(3000, 5000);
|
const randomDelay = getRandomArbitrary(3000, 5000);
|
||||||
@ -58,17 +60,36 @@ function TrialChoicePage() {
|
|||||||
ref={pageRef}
|
ref={pageRef}
|
||||||
style={{
|
style={{
|
||||||
backgroundColor: gender === "male" ? "#C1E5FF" : "#f7ebff",
|
backgroundColor: gender === "male" ? "#C1E5FF" : "#f7ebff",
|
||||||
|
paddingTop: !videoUrl.length ? "15px" : "0px",
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
<BackgroundTopBlob
|
{!videoUrl.length && (
|
||||||
width={pageWidth}
|
<>
|
||||||
className={styles["background-top-blob"]}
|
<BackgroundTopBlob
|
||||||
height={180}
|
width={pageWidth}
|
||||||
/>
|
className={styles["background-top-blob"]}
|
||||||
<Header className={styles.header} />
|
height={180}
|
||||||
|
/>
|
||||||
|
<Header className={styles.header} />
|
||||||
|
</>
|
||||||
|
)}
|
||||||
|
{!!videoUrl.length && (
|
||||||
|
<PersonalVideo
|
||||||
|
gender={gender}
|
||||||
|
url={videoUrl}
|
||||||
|
classNameContainer={styles["personal-video"]}
|
||||||
|
/>
|
||||||
|
)}
|
||||||
{!isLoading && (
|
{!isLoading && (
|
||||||
<>
|
<>
|
||||||
<p className={styles.text} style={{ marginTop: "60px" }}>
|
<p
|
||||||
|
className={styles.text}
|
||||||
|
style={{
|
||||||
|
marginTop: !videoUrl.length
|
||||||
|
? "60px"
|
||||||
|
: "calc((100% + 84px) / 16* 9 + 16px)",
|
||||||
|
}}
|
||||||
|
>
|
||||||
{getText("text.0", {
|
{getText("text.0", {
|
||||||
replacementSelector: "b",
|
replacementSelector: "b",
|
||||||
color: "#1C38EA",
|
color: "#1C38EA",
|
||||||
@ -119,15 +140,17 @@ function TrialChoicePage() {
|
|||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
<p className={styles.email}>{email}</p>
|
<p className={styles.email}>{email}</p>
|
||||||
<QuestionnaireGreenButton
|
{!isDisabled && (
|
||||||
className={styles.button}
|
<QuestionnaireGreenButton
|
||||||
disabled={isDisabled}
|
className={styles.button}
|
||||||
onClick={handleNext}
|
disabled={isDisabled}
|
||||||
>
|
onClick={handleNext}
|
||||||
{getText("text.button.1", {
|
>
|
||||||
color: "#1C38EA",
|
{getText("text.button.1", {
|
||||||
})}
|
color: "#1C38EA",
|
||||||
</QuestionnaireGreenButton>
|
})}
|
||||||
|
</QuestionnaireGreenButton>
|
||||||
|
)}
|
||||||
<p className={styles["auxiliary-text"]}>
|
<p className={styles["auxiliary-text"]}>
|
||||||
{getText("text.4", {
|
{getText("text.4", {
|
||||||
color: "#1C38EA",
|
color: "#1C38EA",
|
||||||
|
|||||||
@ -5,7 +5,7 @@
|
|||||||
min-height: 100dvh;
|
min-height: 100dvh;
|
||||||
height: fit-content;
|
height: fit-content;
|
||||||
background-color: #fff0f0;
|
background-color: #fff0f0;
|
||||||
padding: 15px 42px 60px;
|
padding: 0 42px 126px;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
max-width: 500px;
|
max-width: 500px;
|
||||||
}
|
}
|
||||||
@ -133,10 +133,17 @@
|
|||||||
font-size: 18px;
|
font-size: 18px;
|
||||||
min-height: 0;
|
min-height: 0;
|
||||||
height: 50px;
|
height: 50px;
|
||||||
|
position: fixed;
|
||||||
|
bottom: calc(0dvh + 16px);
|
||||||
|
width: calc(100% - 84px);
|
||||||
}
|
}
|
||||||
|
|
||||||
.email {
|
.email {
|
||||||
font-weight: 500;
|
font-weight: 500;
|
||||||
|
word-break: break-all;
|
||||||
|
white-space: normal;
|
||||||
|
line-height: 1.3;
|
||||||
|
text-align: center;
|
||||||
}
|
}
|
||||||
|
|
||||||
.loader {
|
.loader {
|
||||||
@ -145,3 +152,11 @@
|
|||||||
left: 50%;
|
left: 50%;
|
||||||
transform: translate(-50%, -50%);
|
transform: translate(-50%, -50%);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.personal-video {
|
||||||
|
position: fixed !important;
|
||||||
|
top: 0dvh;
|
||||||
|
z-index: 30;
|
||||||
|
margin-top: 0 !important;
|
||||||
|
border-radius: 0 !important;
|
||||||
|
}
|
||||||
@ -1,5 +1,6 @@
|
|||||||
.container {
|
.container {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
|
max-width: 500px;
|
||||||
margin: 24px 0 16px;
|
margin: 24px 0 16px;
|
||||||
position: relative;
|
position: relative;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
|
|||||||
@ -69,7 +69,7 @@ function WithPartnerInformation(props: IWithPartnerInformationProps) {
|
|||||||
<ul>
|
<ul>
|
||||||
<li>
|
<li>
|
||||||
<h6>Zodiac sign</h6>
|
<h6>Zodiac sign</h6>
|
||||||
<p>{partnerZodiacSign.length ? partnerZodiacSign : "-"}</p>
|
<p>{partnerZodiacSign?.length ? partnerZodiacSign : "-"}</p>
|
||||||
</li>
|
</li>
|
||||||
<li>
|
<li>
|
||||||
<h6>Gender</h6>
|
<h6>Gender</h6>
|
||||||
|
|||||||
@ -24,7 +24,6 @@ import { useDynamicSize } from "@/hooks/useDynamicSize";
|
|||||||
import { EPlacementKeys, IPaywallProduct } from "@/api/resources/Paywall";
|
import { EPlacementKeys, IPaywallProduct } from "@/api/resources/Paywall";
|
||||||
import { usePaywall } from "@/hooks/paywall/usePaywall";
|
import { usePaywall } from "@/hooks/paywall/usePaywall";
|
||||||
import PaymentModal from "@/components/PaymentModal";
|
import PaymentModal from "@/components/PaymentModal";
|
||||||
import PersonalVideo from "./components/PersonalVideo";
|
|
||||||
import metricService, { EGoals } from "@/services/metric/metricService";
|
import metricService, { EGoals } from "@/services/metric/metricService";
|
||||||
|
|
||||||
function TrialPaymentPage() {
|
function TrialPaymentPage() {
|
||||||
@ -55,7 +54,6 @@ function TrialPaymentPage() {
|
|||||||
"single" | "partner"
|
"single" | "partner"
|
||||||
>("single");
|
>("single");
|
||||||
const { subPlan } = useParams();
|
const { subPlan } = useParams();
|
||||||
const { videoUrl } = useSelector(selectors.selectPersonalVideo);
|
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
if (subPlan) {
|
if (subPlan) {
|
||||||
@ -137,13 +135,6 @@ function TrialPaymentPage() {
|
|||||||
</div>
|
</div>
|
||||||
<Header className={styles.header} />
|
<Header className={styles.header} />
|
||||||
<TrialPaymentHeader buttonClick={openStripeModal} />
|
<TrialPaymentHeader buttonClick={openStripeModal} />
|
||||||
{!!videoUrl.length && (
|
|
||||||
<PersonalVideo
|
|
||||||
gender={gender}
|
|
||||||
url={videoUrl}
|
|
||||||
classNameContainer={styles["personal-video"]}
|
|
||||||
/>
|
|
||||||
)}
|
|
||||||
{singleOrWithPartner === "partner" && (
|
{singleOrWithPartner === "partner" && (
|
||||||
<WithPartnerInformation
|
<WithPartnerInformation
|
||||||
zodiacSign={zodiacSign}
|
zodiacSign={zodiacSign}
|
||||||
|
|||||||
@ -42,9 +42,3 @@
|
|||||||
padding: 0 14px;
|
padding: 0 14px;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
}
|
}
|
||||||
|
|
||||||
.personal-video {
|
|
||||||
position: sticky !important;
|
|
||||||
top: 62px;
|
|
||||||
z-index: 30;
|
|
||||||
}
|
|
||||||
Loading…
Reference in New Issue
Block a user