add home page and projects page

This commit is contained in:
2025-08-31 21:34:49 +02:00
parent 17f3b1aa1c
commit 78dec2a053
10 changed files with 132 additions and 30 deletions
+2 -2
View File
@@ -10,14 +10,14 @@ function Experiences() {
useEffect(() => {
const fetchExperiencesAndTasks = async () => {
try {
let response = await fetch('/api/experiences');
let response = await fetch('/api/experiences/');
if (!response.ok) {
throw new Error(`Erreur HTTP: ${response.status}`);
}
let data = await response.json();
setExperiences(data.data);
response = await fetch('/api/experienceTasks');
response = await fetch('/api/experienceTasks/');
if (!response.ok) {
throw new Error(`Erreur HTTP: ${response.status}`);
}
+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>
)
+1 -1
View File
@@ -9,7 +9,7 @@ function Skills() {
useEffect(() => {
const fetchSkills = async () => {
try {
const response = await fetch('/api/skills');
const response = await fetch('/api/skills/');
if (!response.ok) {
throw new Error(`Erreur HTTP: ${response.status}`);
}