add docker files
This commit is contained in:
@@ -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" }}>
|
||||
|
||||
Reference in New Issue
Block a user