import React, { FC, ReactType, ReactNode } from 'react'; import * as R from 'ramda'; import Layout from '../../components/Layout'; import Content from '../../components/Content'; import { PartnerListProps } from '../../components/PartnerList'; import Banner, { BannerProps } from '../../components/Banner'; import TextWithImage from '../../components/TextWithImage'; import css from './index.module.css'; import { PackageListProps } from '../../components/PackageList'; export interface HomepageProps { title?: string; subtitle?: string; isAustria: boolean; isUk: boolean; BannerProps?: BannerProps; PackageList?: ReactType; PackageListProps?: PackageListProps; Search: ReactType; SearchProps: any; FeaturedPartnersList: ReactType; FeaturedPartnersListProps: PartnerListProps; EnterprisePartnerList: ReactType; SectionHowToProps?: { items: { title: string; image: unknown; }[]; Image: ReactType; }; SectionServicesProps?: { title: string; items: { title: string; image: unknown; }[]; Image: ReactType; }; recommendedPrice?: string; SectionAboutMila?: ReactNode; children?: ReactNode; hasCustomBanner?: boolean; CustomBanner?: ReactType; Alerts?: ReactNode; CategoryTab: ReactType; } const Homepage: FC = ({ title, subtitle, FeaturedPartnersList, FeaturedPartnersListProps, SearchProps, SectionHowToProps, SectionServicesProps, children, SectionAboutMila, Alerts, CategoryTab, }) => { const keepCategories = ['ch', 'de', 'gb', 'uk'].includes( SearchProps?.region?.toLowerCase(), ); return ( {Alerts && Alerts} {CategoryTab && keepCategories && CategoryTab} {SectionServicesProps && SectionHowToProps && (
{SectionHowToProps.items.map(item => { return (
); })}
{SectionServicesProps.items.map(item => { return (
); })}
)} {children} {SectionAboutMila && SectionAboutMila}
); }; export default Homepage;