fix
This commit is contained in:
parent
6fd518473a
commit
f7f1590d64
@ -12,12 +12,13 @@ import {
|
|||||||
SpecialOffer,
|
SpecialOffer,
|
||||||
Statistics,
|
Statistics,
|
||||||
WhatGet,
|
WhatGet,
|
||||||
} from "@/components/domains/email-marketing/compatibility/v2";
|
} from "@/components/domains/email-marketing/soulmate/v1";
|
||||||
import { loadFunnelPaymentById } from "@/entities/session/funnel/loaders";
|
import { loadFunnelPaymentById } from "@/entities/session/funnel/loaders";
|
||||||
import {
|
import {
|
||||||
IFunnelPaymentPlacement,
|
IFunnelPaymentPlacement,
|
||||||
IFunnelPaymentVariant,
|
IFunnelPaymentVariant,
|
||||||
} from "@/entities/session/funnel/types";
|
} from "@/entities/session/funnel/types";
|
||||||
|
import { loadUser } from "@/entities/user/loaders";
|
||||||
import { Currency, ELocalesPlacement } from "@/types";
|
import { Currency, ELocalesPlacement } from "@/types";
|
||||||
|
|
||||||
import styles from "./page.module.scss";
|
import styles from "./page.module.scss";
|
||||||
@ -26,11 +27,18 @@ const payload = {
|
|||||||
funnel: ELocalesPlacement.EmailMarketingSoulmateV1,
|
funnel: ELocalesPlacement.EmailMarketingSoulmateV1,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
function getUsernameFromEmail(email: string): string {
|
||||||
|
const localPart = email.split("@")[0];
|
||||||
|
return `@${localPart}`;
|
||||||
|
}
|
||||||
|
|
||||||
export default async function EmailMarketingSoulmateV1Landing() {
|
export default async function EmailMarketingSoulmateV1Landing() {
|
||||||
const payment = (await loadFunnelPaymentById(
|
const [payment, user] = await Promise.all([
|
||||||
payload,
|
loadFunnelPaymentById(payload, "main") as Promise<IFunnelPaymentPlacement | null>,
|
||||||
"main"
|
loadUser(),
|
||||||
)) as IFunnelPaymentPlacement | null;
|
]);
|
||||||
|
|
||||||
|
const username = getUsernameFromEmail(user.email);
|
||||||
|
|
||||||
const variant = payment?.variants?.[0];
|
const variant = payment?.variants?.[0];
|
||||||
const currency = payment?.currency || Currency.USD;
|
const currency = payment?.currency || Currency.USD;
|
||||||
@ -43,7 +51,7 @@ export default async function EmailMarketingSoulmateV1Landing() {
|
|||||||
<HeaderTimer />
|
<HeaderTimer />
|
||||||
<Header />
|
<Header />
|
||||||
<HiBlock />
|
<HiBlock />
|
||||||
<WhatGet />
|
<WhatGet username={username} />
|
||||||
<SpecialOffer
|
<SpecialOffer
|
||||||
variant={variant as IFunnelPaymentVariant}
|
variant={variant as IFunnelPaymentVariant}
|
||||||
currency={currency}
|
currency={currency}
|
||||||
|
|||||||
@ -5,7 +5,7 @@ import {
|
|||||||
HeaderTimer,
|
HeaderTimer,
|
||||||
PricingSummary,
|
PricingSummary,
|
||||||
SpecialOfferButtonWrapper,
|
SpecialOfferButtonWrapper,
|
||||||
} from "@/components/domains/email-marketing/compatibility/v2";
|
} from "@/components/domains/email-marketing/soulmate/v1";
|
||||||
import { Typography } from "@/components/ui";
|
import { Typography } from "@/components/ui";
|
||||||
import { loadFunnelPaymentById } from "@/entities/session/funnel/loaders";
|
import { loadFunnelPaymentById } from "@/entities/session/funnel/loaders";
|
||||||
import { IFunnelPaymentPlacement } from "@/entities/session/funnel/types";
|
import { IFunnelPaymentPlacement } from "@/entities/session/funnel/types";
|
||||||
|
|||||||
|
Before Width: | Height: | Size: 1.6 KiB After Width: | Height: | Size: 1.6 KiB |
@ -9,9 +9,6 @@ import { translatePathEmailMarketingSoulmateV1 } from "@/shared/constants/transl
|
|||||||
|
|
||||||
import styles from "./SearchCompatiblePartnerCard.module.scss";
|
import styles from "./SearchCompatiblePartnerCard.module.scss";
|
||||||
|
|
||||||
// TODO
|
|
||||||
const username = "@annAgejsdbvjsbdv";
|
|
||||||
|
|
||||||
interface IBar {
|
interface IBar {
|
||||||
text: string;
|
text: string;
|
||||||
percent: string;
|
percent: string;
|
||||||
@ -21,7 +18,13 @@ interface IBar {
|
|||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
export default function SearchCompatiblePartnerCard() {
|
interface ISearchCompatiblePartnerCardProps {
|
||||||
|
username: string;
|
||||||
|
}
|
||||||
|
|
||||||
|
export default function SearchCompatiblePartnerCard({
|
||||||
|
username,
|
||||||
|
}: ISearchCompatiblePartnerCardProps) {
|
||||||
const t = useTranslations(
|
const t = useTranslations(
|
||||||
translatePathEmailMarketingSoulmateV1(
|
translatePathEmailMarketingSoulmateV1(
|
||||||
"Landing.what-get.search-compatible-partner"
|
"Landing.what-get.search-compatible-partner"
|
||||||
@ -10,7 +10,11 @@ import SearchCompatiblePartnerCard from "../SearchCompatiblePartnerCard/SearchCo
|
|||||||
|
|
||||||
import styles from "./WhatGet.module.scss";
|
import styles from "./WhatGet.module.scss";
|
||||||
|
|
||||||
export default async function WhatGet() {
|
interface IWhatGetProps {
|
||||||
|
username: string;
|
||||||
|
}
|
||||||
|
|
||||||
|
export default async function WhatGet({ username }: IWhatGetProps) {
|
||||||
const t = await getTranslations(
|
const t = await getTranslations(
|
||||||
translatePathEmailMarketingSoulmateV1("Landing.what-get")
|
translatePathEmailMarketingSoulmateV1("Landing.what-get")
|
||||||
);
|
);
|
||||||
@ -23,7 +27,7 @@ export default async function WhatGet() {
|
|||||||
<DetailedPortraitCard />
|
<DetailedPortraitCard />
|
||||||
<GuideCard />
|
<GuideCard />
|
||||||
<IndividualAdviceCard />
|
<IndividualAdviceCard />
|
||||||
<SearchCompatiblePartnerCard />
|
<SearchCompatiblePartnerCard username={username} />
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
Loading…
Reference in New Issue
Block a user