add home page and projects page
This commit is contained in:
@@ -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}`);
|
||||
}
|
||||
|
||||
@@ -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>
|
||||
)
|
||||
|
||||
@@ -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}`);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user