prmbr-image-mksaas/src/app/[locale]/(marketing)/(home)/page.tsx
javayhu 43777b5989 feat: add LogoCloud section to homepage
- Introduced a new LogoCloudSection component to showcase partner logos on the homepage, enhancing brand visibility.
- Updated English and Chinese JSON files to include a title for the LogoCloud section.
- Refactored the homepage to integrate the new LogoCloudSection, improving overall layout and user engagement.
- Added multiple SVG logos to the public/svg directory for use in the LogoCloud section.
2025-04-12 21:22:30 +08:00

85 lines
2.3 KiB
TypeScript

import FaqSection from '@/components/blocks/faqs/faqs';
import HeroSection from '@/components/blocks/hero/hero';
import { constructMetadata } from '@/lib/metadata';
import { getUrlWithLocale } from '@/lib/urls/urls';
import { Metadata } from 'next';
import { Locale } from 'next-intl';
import { getTranslations } from 'next-intl/server';
import CallToAction from '../../preview/call-to-action/one/page';
import ContentSection from '../../preview/content/one/page';
import Features from '../../preview/features/one/page';
import Pricing from '../../preview/pricing/three/page';
import StatsSection from '../../preview/stats/one/page';
import Testimonials from '../../preview/testimonials/one/page';
import LogoCloud from '@/components/blocks/logo-cloud/logo-cloud';
/**
* https://next-intl.dev/docs/environments/actions-metadata-route-handlers#metadata-api
*/
export async function generateMetadata({
params,
}: {
params: Promise<{ locale: Locale }>;
}): Promise<Metadata | undefined> {
const { locale } = await params;
const t = await getTranslations({ locale, namespace: 'Metadata' });
return constructMetadata({
title: t('title'),
description: t('description'),
canonicalUrl: getUrlWithLocale('/', locale),
});
}
interface HomePageProps {
params: Promise<{ locale: Locale }>;
}
export default async function HomePage(props: HomePageProps) {
const params = await props.params;
const { locale } = params;
const t = await getTranslations('HomePage');
return (
<>
<div className="flex flex-col">
<div id="hero" className="">
<HeroSection />
</div>
<div id="logo-cloud" className="">
<LogoCloud />
</div>
<div id="features" className="">
<Features />
</div>
<div id="content" className="">
<ContentSection />
</div>
<div id="pricing" className="">
<Pricing />
</div>
<div id="faqs" className="">
<FaqSection />
</div>
<div id="testimonials" className="">
<Testimonials />
</div>
<div id="stats" className="">
<StatsSection />
</div>
<div id="call-to-action" className="">
<CallToAction />
</div>
</div>
</>
);
}