Files
pasargad/src/components/pages/home/Projects.tsx
T

34 lines
1.2 KiB
TypeScript
Raw Normal View History

import SectionTitle from '@/components/layout/sectionTitle';
import { getTranslations } from 'next-intl/server';
import { TLocales } from '@/models/layout';
2025-06-10 17:30:21 +03:30
import { getProjects } from '@/services/projects';
import { IProjectCardProps } from '../project/project';
2025-06-10 17:30:21 +03:30
import ProjectsGrid from '../project/ProjectGrid';
interface Props {
locale: TLocales;
}
export default async function HomePageProjects({ locale }: Props) {
const t = await getTranslations({ locale });
2025-06-10 17:30:21 +03:30
const projects: IProjectCardProps[] = await getProjects();
return (
<div className="w-full">
<div
2025-06-10 17:30:21 +03:30
className={`relative w-full bg-white bg-cover bg-fixed bg-center bg-no-repeat pt-28`}
>
<div className="relative z-20 container mx-auto grid grid-cols-2 gap-28">
<SectionTitle
2025-06-10 17:30:21 +03:30
title={t('pages_projects_title')}
description={t('com_home_projects_title')}
description_bold={t('com_home_projects_title_bold')}
/>
2025-06-10 17:30:21 +03:30
<h4 className="pt-10 text-base font-extralight tracking-normal">
{t('com_home_projects_description')}
</h4>
</div>
2025-06-10 17:30:21 +03:30
<ProjectsGrid projects={projects?.slice(-4)} />
</div>
</div>
);
}