api project

This commit is contained in:
zahravaziri
2025-06-10 17:30:21 +03:30
parent 3e9143f32c
commit ab37893d1b
11 changed files with 172 additions and 278 deletions
+3 -36
View File
@@ -1,42 +1,9 @@
import images from '@/assets/images/images';
import Image from 'next/image';
import Link from 'next/link';
import { IProjectCardProps } from './project';
import { getProjects } from '@/services/projects';
const projects = [
{
title: 'Sustainable Practices Reducing Waste in Industrial Production',
imageSrc: images.projectImg_1.src,
link: '#',
},
{
title: 'Advanced Robotics Revolutionizing Industrial Workflows',
imageSrc: images.projectImg_1.src,
link: '#',
},
{
title: 'Top Benefits of the Robotics in Manufacturing',
imageSrc: images.projectImg_1.src,
link: '#',
},
{
title: 'Leveraging Data Analytics for Smarter Production',
imageSrc: images.projectImg_1.src,
link: '#',
},
{
title: 'Reducing Operational Costs Through Automation',
imageSrc: '/images/post5.jpg',
link: '#',
},
{
title: 'The Advantages of Customized Manufacturing Solutions',
imageSrc: '/images/post6.jpg',
link: '#',
},
] as IProjectCardProps[];
export default function ProjectsGrid() {
export default async function ProjectsGrid({ projects }) {
return (
<div className="container mx-auto grid grid-cols-1 gap-6 px-4 py-14 md:grid-cols-2 md:py-28">
{projects.map((project, index) => (
@@ -45,7 +12,7 @@ export default function ProjectsGrid() {
key={index}
className="overflow-hidden bg-white"
>
<div className="relative aspect-[1.09] w-full overflow-hidden rounded-4xl">
<div className="relative aspect-[1.4] w-full overflow-hidden rounded-4xl">
<Image
src={project.imageSrc}
alt={project.title}
@@ -0,0 +1,14 @@
import { getProjects } from '@/services/projects';
import { IProjectCardProps } from './project';
import ProjectsGrid from './ProjectGrid';
export default async function ProjectsGridView() {
const projects: IProjectCardProps[] = await getProjects();
return (
<>
<ProjectsGrid projects={projects} />
{/* <Pagination {...pagination} onPageChange={fetchPage} /> */}
</>
);
}