Advertisement
Guest User

Untitled

a guest
Oct 10th, 2024
242
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
JavaScript 1.65 KB | Source Code | 0 0
  1. import dynamic from 'next/dynamic';
  2. import StorageSolutions from '@/app/[locale]/components/StorageSolutions/StorageSolutions.component';
  3. import AboutContent from './components/About/AboutContent/AboutContent.component';
  4. import { useLocale } from 'next-intl';
  5. import testimonials from '@/data/testimonials';
  6. import { Metadata } from 'next';
  7. import { getTranslations } from 'next-intl/server';
  8.  
  9. const Achievements = dynamic(
  10.   () => import('@/app/[locale]/components/Achievements/Achievements')
  11. );
  12. const DoorToDoorStorage = dynamic(
  13.   () =>
  14.     import(
  15.       '@/app/[locale]/components/DoorToDoorStorage/DoorToDoorStorage.component'
  16.     )
  17. );
  18. const SelfStorage = dynamic(
  19.   () => import('@/app/[locale]/components/SelfStorage/SelfStorage.component')
  20. );
  21. const About = dynamic(
  22.   () => import('@/app/[locale]/components/About/About.component')
  23. );
  24.  
  25. export async function generateMetadata({ params }): Promise<Metadata> {
  26.   const t = await getTranslations('home.meta_data');
  27.   return {
  28.     title: t('title'),
  29.     keywords:
  30.       'hong kong storage, storage hk, spacebox, self storage, box storage, mini storage',
  31.     description: t('description'),
  32.   };
  33. }
  34.  
  35. const HomePage = () => {
  36.   const locale = useLocale();
  37.  
  38.   return (
  39.     <div className="flex flex-col w-full overflow-hidden">
  40.       <StorageSolutions />
  41.       <Achievements
  42.         testimonials={
  43.           locale === 'en'
  44.             ? testimonials.home_page.english
  45.             : testimonials.home_page.chinese
  46.         }
  47.       />
  48.       <DoorToDoorStorage />
  49.       <SelfStorage />
  50.       <About>
  51.         <AboutContent />
  52.       </About>
  53.     </div>
  54.   );
  55. };
  56.  
  57. export default HomePage;
  58.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement