fix: compatibility onboarding, payment method page text
This commit is contained in:
parent
8860ca943f
commit
b9ff3a1ab8
@ -31,8 +31,8 @@ function CompatibilityPage(): JSX.Element {
|
|||||||
const birthdate = useSelector(selectors.selectBirthdate);
|
const birthdate = useSelector(selectors.selectBirthdate);
|
||||||
const onboardingCompatibility = useSelector(
|
const onboardingCompatibility = useSelector(
|
||||||
selectors.selectOnboardingCompatibility
|
selectors.selectOnboardingCompatibility
|
||||||
);
|
).isShown;
|
||||||
|
|
||||||
const [isDisabled, setIsDisabled] = useState(true);
|
const [isDisabled, setIsDisabled] = useState(true);
|
||||||
const [isDisabledName, setIsDisabledName] = useState(true);
|
const [isDisabledName, setIsDisabledName] = useState(true);
|
||||||
const [isDisabledSelfName, setIsDisabledSelfName] = useState(true);
|
const [isDisabledSelfName, setIsDisabledSelfName] = useState(true);
|
||||||
@ -129,8 +129,6 @@ function CompatibilityPage(): JSX.Element {
|
|||||||
const { data } = useApiCall<AICompatCategories.CompatCategory[]>(loadData);
|
const { data } = useApiCall<AICompatCategories.CompatCategory[]>(loadData);
|
||||||
|
|
||||||
const handleValidSelfName = (name: string) => {
|
const handleValidSelfName = (name: string) => {
|
||||||
console.log(name);
|
|
||||||
|
|
||||||
setIsDisabledSelfName(!name.length);
|
setIsDisabledSelfName(!name.length);
|
||||||
setSelfName(name);
|
setSelfName(name);
|
||||||
checkAllDisabled();
|
checkAllDisabled();
|
||||||
@ -158,7 +156,10 @@ function CompatibilityPage(): JSX.Element {
|
|||||||
setCompatCategory(parseInt(event.target.value));
|
setCompatCategory(parseInt(event.target.value));
|
||||||
};
|
};
|
||||||
|
|
||||||
const scrollToElementOnboarding = (nextOnboarding: number, ref: HTMLElement | null) => {
|
const scrollToElementOnboarding = (
|
||||||
|
nextOnboarding: number,
|
||||||
|
ref: HTMLElement | null
|
||||||
|
) => {
|
||||||
setCurrentOnboarding(nextOnboarding);
|
setCurrentOnboarding(nextOnboarding);
|
||||||
ref?.scrollIntoView({ behavior: "smooth" });
|
ref?.scrollIntoView({ behavior: "smooth" });
|
||||||
};
|
};
|
||||||
|
|||||||
@ -31,7 +31,7 @@ function NavbarFooter({ items }: INavbarHomeProps): JSX.Element {
|
|||||||
useState(!onboardingConfigNavbarFooter?.isShown);
|
useState(!onboardingConfigNavbarFooter?.isShown);
|
||||||
const [selectedOnboarding, setSelectedOnboarding] = useState(3);
|
const [selectedOnboarding, setSelectedOnboarding] = useState(3);
|
||||||
const [rerender, setRerender] = useState(false);
|
const [rerender, setRerender] = useState(false);
|
||||||
console.log(rerender);
|
rerender
|
||||||
|
|
||||||
const buttonsRef = useRef([] as HTMLDivElement[]);
|
const buttonsRef = useRef([] as HTMLDivElement[]);
|
||||||
|
|
||||||
|
|||||||
@ -32,6 +32,9 @@ function PaymentPage(): JSX.Element {
|
|||||||
const isLoading = applePay === null
|
const isLoading = applePay === null
|
||||||
const isApplePayAvailable = import.meta.env.PROD && applePay?.canMakePayments()
|
const isApplePayAvailable = import.meta.env.PROD && applePay?.canMakePayments()
|
||||||
const email = useSelector(selectors.selectEmail)
|
const email = useSelector(selectors.selectEmail)
|
||||||
|
const isDiscount = useSelector(selectors.selectIsDiscount)
|
||||||
|
const selectedPrice = useSelector(selectors.selectSelectedPrice)
|
||||||
|
const price = isDiscount ? (Math.round(selectedPrice || 0) / 2).toFixed(2) : selectedPrice
|
||||||
const onSuccess = useCallback(() => {
|
const onSuccess = useCallback(() => {
|
||||||
dispatch(actions.status.update('subscribed'))
|
dispatch(actions.status.update('subscribed'))
|
||||||
navigate(routes.client.wallpaper())
|
navigate(routes.client.wallpaper())
|
||||||
@ -61,7 +64,7 @@ function PaymentPage(): JSX.Element {
|
|||||||
<div className='payment-divider'>{t('or').toUpperCase()}</div>
|
<div className='payment-divider'>{t('or').toUpperCase()}</div>
|
||||||
<CardButton onClick={() => setOpenCardModal(true)} />
|
<CardButton onClick={() => setOpenCardModal(true)} />
|
||||||
<p className='payment-warining'>
|
<p className='payment-warining'>
|
||||||
{t('will_be_charged', { strongText: <strong>{t('trial_price')}</strong> })}
|
{t('will_be_charged', { strongText: <strong>{t('trial_price', { price: price })}</strong> })}
|
||||||
</p>
|
</p>
|
||||||
<CardModal
|
<CardModal
|
||||||
open={openCardModal}
|
open={openCardModal}
|
||||||
|
|||||||
@ -33,9 +33,7 @@ function PriceItem({
|
|||||||
click,
|
click,
|
||||||
}: IPrice & PriceItemProps): JSX.Element {
|
}: IPrice & PriceItemProps): JSX.Element {
|
||||||
const _price = new Price(roundToWhole(value), currency, locale);
|
const _price = new Price(roundToWhole(value), currency, locale);
|
||||||
console.log(id, active);
|
|
||||||
|
|
||||||
|
|
||||||
const compatClassName = () => {
|
const compatClassName = () => {
|
||||||
const isPopular = id === 3;
|
const isPopular = id === 3;
|
||||||
const isActive = active;
|
const isActive = active;
|
||||||
|
|||||||
@ -38,7 +38,6 @@ function PriceList({click}: PriceListProps): JSX.Element {
|
|||||||
const [activePriceItem, setActivePriceItem] = useState<number | null>(null)
|
const [activePriceItem, setActivePriceItem] = useState<number | null>(null)
|
||||||
|
|
||||||
const priceItemClick = (id: number) => {
|
const priceItemClick = (id: number) => {
|
||||||
console.log(id);
|
|
||||||
setActivePriceItem(id)
|
setActivePriceItem(id)
|
||||||
const activePriceItem = prices.find((item) => item.id === Number(id))
|
const activePriceItem = prices.find((item) => item.id === Number(id))
|
||||||
if (activePriceItem) {
|
if (activePriceItem) {
|
||||||
|
|||||||
@ -43,7 +43,7 @@ export default {
|
|||||||
card: "Credit / Debit Card",
|
card: "Credit / Debit Card",
|
||||||
contact_us: "Contact us",
|
contact_us: "Contact us",
|
||||||
will_be_charged: "You will be charged only <strongText>. We'll email your a reminder before your trial period ends.",
|
will_be_charged: "You will be charged only <strongText>. We'll email your a reminder before your trial period ends.",
|
||||||
trial_price: "$1 for your 7-day trial",
|
trial_price: "$<price> for your 7-day trial",
|
||||||
start_trial: "Start 7-Day Trial",
|
start_trial: "Start 7-Day Trial",
|
||||||
analysis_background: "Analysis of personal background",
|
analysis_background: "Analysis of personal background",
|
||||||
error_processing: "An error processing your order.",
|
error_processing: "An error processing your order.",
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user