fix project slider

This commit is contained in:
zahravaziri
2025-07-01 12:40:24 +03:30
parent 584bc5522e
commit 19e53d4b97
2 changed files with 32 additions and 14 deletions
@@ -1,3 +1,5 @@
'use client';
import Image from 'next/image';
import Link from 'next/link';
import Button from '@/components/uikit/button';
@@ -11,12 +13,13 @@ interface Props {
locale: TLocales;
}
const ProjectThumb = ({ project, locale }: Props) => {
export default function ProjectThumb({ project, locale }: Props) {
const t = useTranslations();
const routes = routeFactory(t, locale);
return (
<div className="group flex flex-col gap-3 overflow-hidden bg-white md:gap-5">
<div className="relative aspect-[1.4] w-full overflow-hidden rounded-2xl">
<div className="relative aspect-[1.09] w-full overflow-hidden rounded-2xl">
<Image
src={project.imageSrc}
alt={project.title}
@@ -24,7 +27,7 @@ const ProjectThumb = ({ project, locale }: Props) => {
className="h-auto w-full object-cover"
/>
<div className="invisible absolute inset-0 flex items-center justify-center bg-black/20 opacity-0 backdrop-blur-xs transition-all group-hover:visible group-hover:opacity-100">
<Button endIcon="showMore" link={routes.project.route(project.id)}>
<Button link={routes.project.route(project.id)} endIcon="showMore">
{t('com_home_projects_details_CTA')}
</Button>
</div>
@@ -38,6 +41,4 @@ const ProjectThumb = ({ project, locale }: Props) => {
</Link>
</div>
);
};
export default ProjectThumb;
}