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