add home page and projects page

This commit is contained in:
Giovanni committed 2025-08-31 21:34:49 +02:00
1 parent 17f3b1aa1c
commit 78dec2a053
10 files changed
+132 -30

No files matched your search

+3 -4
View File
@@ -1,6 +1,7 @@
import SingleProject from "./SingleProject.jsx";
import "../styles/Projects.css"
import React, {useEffect, useState} from "react";
import {Link} from "react-router-dom";
function Projects() {
const [projects, setProjects] = useState([]);
const [error, setError] = useState(null);
@@ -8,7 +9,7 @@ function Projects() {
useEffect(() => {
const fetchProjects = async () => {
try {
const response = await fetch('/api/projects');
const response = await fetch('/api/projects/');
if (!response.ok) {
throw new Error(`Erreur HTTP: ${response.status}`);
}
@@ -35,9 +36,7 @@ function Projects() {
))}
</div>
<div className="show-more-container">
<p className="show-more-link">
Show more
</p>
<Link to="/projets" className="show-more-link">Show more</Link>
</div>
</section>
)