add docker files

This commit is contained in:
achraf
2026-04-03 18:32:22 +02:00
parent 8e62a0fa92
commit 16e7547fcc
9 changed files with 406 additions and 212 deletions

View File

@@ -1,6 +1,6 @@
"use client";
import { useState } from "react";
import { useState, useEffect } from "react";
import SafeImage from "./SafeImage";
interface Task {
@@ -296,6 +296,16 @@ function ProjectRow({
export default function Projects({ projects }: ProjectsProps) {
const [openIndex, setOpenIndex] = useState<number | null>(0);
useEffect(() => {
const handleOpenProject = (e: CustomEvent) => {
if (typeof e.detail?.index === "number") {
setOpenIndex(e.detail.index);
}
};
window.addEventListener("openProject", handleOpenProject as EventListener);
return () => window.removeEventListener("openProject", handleOpenProject as EventListener);
}, []);
return (
<section id="projects" style={{ padding: "8rem 0" }}>
<div style={{ maxWidth: "1200px", margin: "0 auto", padding: "0 2rem" }}>