Refactor project slug handling and improve project retrieval logic
All checks were successful
Build and Deploy Gabriel Kaszewski Portfolio / build-and-deploy-local (push) Successful in 1m46s

This commit is contained in:
2026-08-21 15:46:33 +02:00
parent 39f1982fc9
commit 4d0cbb7fb2
5 changed files with 25 additions and 15 deletions

View File

@@ -2,6 +2,7 @@ import Link from "next/link";
import { Project } from "@/lib/types";
import Chip from "@/components/chip";
import { Eye } from "lucide-react";
import { projectSlug } from "@/lib/data";
const CommercialProjectCard = ({ project }: { project: Project }) => {
return (
@@ -34,7 +35,7 @@ const CommercialProjectCard = ({ project }: { project: Project }) => {
<div className="flex gap-3 mt-auto">
<Link
href={`/projects/${project.name}`}
href={`/projects/${projectSlug(project)}`}
className="flex-1 px-4 py-3 text-center font-bold text-black bg-yellow-400 rounded-xl hover:bg-yellow-500 transition-colors glass-effect glossy-effect bottom gloss-highlight"
>
Read more

View File

@@ -1,4 +1,5 @@
import Link from "next/link";
import { projectSlug } from "@/lib/data";
import { Project } from "@/lib/types";
import Chip from "@/components/chip";
import ImageCarousel from "@/components/image-carousel";
@@ -64,7 +65,7 @@ const ProjectItem = ({ project }: ProjectItemProps) => {
</div>
<Link
href={`/projects/${project.name}`}
href={`/projects/${projectSlug(project)}`}
className="text-center glass-effect glossy-effect bottom gloss-highlight p-2 rounded-2xl bg-yellow-400 hover:bg-yellow-500 text-black font-bold"
>
Read more