Skip to content

Commit

Permalink
modif url api, re ajout de la variable et modif de celle ci dans gith…
Browse files Browse the repository at this point in the history
…ub pour /api
  • Loading branch information
Khagou committed Mar 23, 2024
1 parent 23aa64a commit 2ffceef
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion client/src/components/Portfolio/PortfolioContent.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ const PortfolioContent = () => {

useEffect(() => {
axios
.get("api/images")
.get(process.env.REACT_APP_URL_API + "/images")
.then((res) => setData(res.data));
}, []);

Expand Down
2 changes: 1 addition & 1 deletion client/src/components/home/Apropos.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ const Apropos = () => {
useEffect(() => {
console.log(process.env.REACT_APP_URL_API);
axios
.get("api/article")
.get(process.env.REACT_APP_URL_API + "/article")
.then((res) => setData(res.data));
}, []);
return (
Expand Down
2 changes: 1 addition & 1 deletion client/src/components/home/Skills.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ const Skills = () => {
// Le useEffect ce joue lorsque le composant est monté
useEffect(() => {
axios
.get("api/tech") // url de l'api
.get(process.env.REACT_APP_URL_API + "/tech") // url de l'api
.then((res) => setData(res.data))
.catch((error) => console.error(error));
}, []);
Expand Down

0 comments on commit 2ffceef

Please sign in to comment.