feat: Enhance portfolio with SEO meta tags, implement API for experie… (#2)

* feat: Enhance portfolio with SEO meta tags, implement API for experiences and projects, and refactor components for improved structure

* fix: address Copilot review comments on PR #2

- Migrate Grid callers to the System Grid size prop (GridWrapper)
- Render experience icons from exp.type instead of exp.icon
- Show experience date range (dateS-dateE) on desktop and mobile
- Select experience description from the active i18n language
- Restore technology chips from exp.technologies
- Rename uesExperience hook to useExperience
- Normalize getProjets response to the { data, count } shape
- Return ExperienceFull from getExperience
- Type useEditProjet/updateProjet with ProjetEdit
- Fetch project details from the API in Projet page (useProjet)
- Replace ExperienceType enum with const object (erasableSyntaxOnly)
- Sync document lang attribute with the active language
This commit is contained in:
SYLVAIN TROUILH
2026-09-12 20:29:55 +00:00
committed by GitHub
parent bdb9866164
commit cf68d2d2e4
18 changed files with 294 additions and 145 deletions
+26
View File
@@ -0,0 +1,26 @@
import axios from "axios";
import type { Experiencecreate, ExperienceFull, Experiences } from "../types/experience";
export async function getExperiences(): Promise<Experiences> {
const url = import.meta.env.VITE_API_URL + "/experiences";
const experiences = await axios.get(url);
return experiences.data;
}
export async function getExperience(id: number): Promise<ExperienceFull> {
const url = import.meta.env.VITE_API_URL + "/experience/" + id;
const experience = await axios.get(url);
return experience.data;
}
export async function createExperience(experience: Experiencecreate): Promise<Experiencecreate> {
const url = import.meta.env.VITE_API_URL + "/experiences";
const newexperience = await axios.post(url, experience);
return newexperience.data;
}
export async function deleteExperience(id: number): Promise<void> {
const url = import.meta.env.VITE_API_URL + "/experience/" + id;
await axios.delete(url);
}