"use client"; import { useState } from "react"; import { ArrowUpLeft, ArrowUpRight, FolderKanban } from "lucide-react"; import { Portfolio } from "@/utilities/types/portfolio.type"; import { useTranslations, useLocale } from "next-intl"; import Image from "next/image"; import { BACKEND_URL } from "@/utilities/constants/urls.constant"; const tabs = ["all", "software", "network"] as const; export default function Projects({ data }: { data: Portfolio[] }) { const [activeTab, setActiveTab] = useState("all"); const t = useTranslations("home.projects"); const locale = useLocale(); const filteredPortfolios = data.filter((p) => (activeTab === "all" ? true : p.category === activeTab)); const ArrowIcon = locale === "en" ? ArrowUpRight : ArrowUpLeft; return (

{t("title")}

{t("subtitle")}

{/* Tabs */}
{tabs.map((tab) => ( ))}
{filteredPortfolios.map((p) => (
{/* Image placeholder */}
{`تصویر
{t(`tabs.${p.category}`)}
{/* Content wrapper taking remaining height */}
{/* Title & Desc wrapper pushed to top */}

{p.title}

{p.description}

{/* View Project button pushed to bottom */}
{t("view_project")}
))}
); }