Merge branch 'feature/landing-tests'
Some checks failed
it-academy/dry-wash-pl/pipeline/head There was a failure building this commit

This commit is contained in:
RustamRu
2025-02-16 12:05:31 +03:00
32 changed files with 1691 additions and 27 deletions

View File

@@ -9,12 +9,12 @@ import { BenefitsSectionProps } from './types';
import { iconsMap } from './helper';
export const BenefitsSection: FC<BenefitsSectionProps> = ({
data: { heading, description, list } = {},
data: { heading, description, list } = {}, ...props
}) => {
const { t } = useTranslation('~', { keyPrefix: 'dry-wash.landing' });
return (
<PageSection>
<PageSection {...props}>
<VStack w='full' spacing={2}>
<Heading as='h2'>{t(heading)}</Heading>
<Text>{t(description)}</Text>

View File

@@ -5,7 +5,9 @@ import { Text } from '@chakra-ui/react';
const currentYear = new Date().getFullYear();
export const Copyright: FC = () => {
const { t } = useTranslation();
const { t } = useTranslation('~', {
keyPrefix: 'dry-wash.landing.footer'
});
return <Text color='whiteAlpha.500'>{t('dry-wash.landing.footer.copyright', { currentYear })}</Text>;
return <Text color='whiteAlpha.500'>{t('copyright', { currentYear })}</Text>;
};

View File

@@ -7,7 +7,7 @@ import { SiteLogo, PageSection } from '../';
import { Copyright } from './Copyright';
export const Footer: FC = () => {
export const Footer: FC = (props) => {
const { t } = useTranslation('~', {
keyPrefix: 'dry-wash.landing.footer.links',
});
@@ -15,11 +15,17 @@ export const Footer: FC = () => {
const listData = [
{ to: '#', label: t('privacy-policy') },
{ to: '#', label: t('service-terms') },
{ to: '#', label: t('faq') },
{ to: '#', label: t('faq') },
];
return (
<PageSection as='footer' py={5} bg='gray.700' color='white'>
<PageSection
as='footer'
py={5}
bg='gray.700'
color='white'
{...props}
>
<SiteLogo />
<Copyright />
<List spacing={2}>

View File

@@ -10,11 +10,18 @@ import { HeroSectionProps } from './types';
export const HeroSection: FC<HeroSectionProps> = ({
data: { headline, description, video } = {},
flexShrink,
...props
}) => {
const { t } = useTranslation('~', { keyPrefix: 'dry-wash.landing' });
return (
<Box flexShrink={flexShrink} as='header' pos='relative' zIndex={0}>
<Box
flexShrink={flexShrink}
as='header'
pos='relative'
zIndex={0}
{...props}
>
<Box
as='video'
src={`${__webpack_public_path__}/remote-assets/${video}`}

View File

@@ -5,9 +5,9 @@ import { Image } from '@chakra-ui/react';
import { LogoSvg } from '../../../assets/icons';
export const SiteLogo: FC = () => {
const { t } = useTranslation();
const { t } = useTranslation('~', { keyPrefix: 'dry-wash.landing' });
return <Image src={LogoSvg} alt={t('~:dry-wash.landing.site-logo')} w={40} />;
return <Image src={LogoSvg} alt={t('site-logo')} w={40} />;
};
// todo: replace Image by SVG React component

View File

@@ -9,11 +9,12 @@ import { SocialProofSectionProps } from './types';
export const SocialProofSection: FC<SocialProofSectionProps> = ({
data: { heading } = {},
...props
}) => {
const { t } = useTranslation('~', { keyPrefix: 'dry-wash.landing' });
return (
<PageSection>
<PageSection {...props}>
<Heading as='h2'>{t(heading)}</Heading>
<ReviewsSlider />
<HStack w='full' justify='flex-end'>

View File

@@ -19,7 +19,7 @@ import {
YMapsProvider,
} from './location';
export const OrderForm = ({ onSubmit, loading }: OrderFormProps) => {
export const OrderForm = ({ onSubmit, loading, ...props }: OrderFormProps) => {
const {
handleSubmit,
control,
@@ -41,7 +41,7 @@ export const OrderForm = ({ onSubmit, loading }: OrderFormProps) => {
]);
return (
<Box p={4} marginInline='auto'>
<Box p={4} marginInline='auto' {...props}>
<VStack
as='form'
noValidate

View File

@@ -41,6 +41,7 @@ export const OrderDetails: FC<OrderDetailsProps> = ({
location,
startWashTime,
endWashTime,
...props
}) => {
const { t } = useTranslation('~', {
keyPrefix: 'dry-wash.order-view.details',
@@ -50,7 +51,7 @@ export const OrderDetails: FC<OrderDetailsProps> = ({
});
return (
<VStack p={4} alignItems='flex-start' gap={4}>
<VStack p={4} alignItems='flex-start' gap={4} {...props}>
<HStack
width='full'
flexWrap='wrap'