mirror of
https://github.com/Ladebeze66/devsite.git
synced 2025-12-16 22:07:45 +01:00
23 lines
580 B
TypeScript
23 lines
580 B
TypeScript
"use client";
|
|
|
|
import { useParams } from "next/navigation";
|
|
import { useEffect, useState } from "react";
|
|
import ContentSection from "../../components/ContentSection";
|
|
|
|
export default function Page() {
|
|
const params = useParams();
|
|
const [slug, setSlug] = useState<string | null>(null);
|
|
|
|
useEffect(() => {
|
|
if (params?.slug) {
|
|
setSlug(params.slug as string);
|
|
}
|
|
}, [params]);
|
|
|
|
if (!slug) {
|
|
return <div className="text-center text-gray-500">⏳ Chargement...</div>;
|
|
}
|
|
|
|
return <ContentSection collection="projects" slug={slug} />;
|
|
}
|