From 353a9c4981a232496538b6c2f9ce3c0423685e33 Mon Sep 17 00:00:00 2001 From: Dm1tr1y147 Date: Tue, 31 Mar 2020 13:49:31 +0500 Subject: [PATCH] changed .env path --- .env | 2 +- src/components/Gallery.js | 2 +- src/components/GalleryItem.js | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.env b/.env index cea9a39..be3544f 100644 --- a/.env +++ b/.env @@ -1 +1 @@ -REACT_APP_API_URL=http://localhost:8000 \ No newline at end of file +REACT_APP_API_URL=https://dmitriy.icu:433 \ No newline at end of file diff --git a/src/components/Gallery.js b/src/components/Gallery.js index 470e133..1f59a87 100644 --- a/src/components/Gallery.js +++ b/src/components/Gallery.js @@ -23,7 +23,7 @@ const Gallery = props => { useEffect( () => { const fetchData = async () => { try { - const res = await fetch(`${process.env.REACT_APP_API_URL}/?size=${size}&page=${currentPage}`); + const res = await fetch(`${process.env.REACT_APP_API_URL}/api/list/?size=${size}&page=${currentPage}`); if (!res.ok) { throw Error(res.statusText); diff --git a/src/components/GalleryItem.js b/src/components/GalleryItem.js index 26445fd..42caf62 100644 --- a/src/components/GalleryItem.js +++ b/src/components/GalleryItem.js @@ -4,7 +4,7 @@ import './GalleryItem.scss'; const GalleryItem = props => { const [showViewBox, setShowViewbox] = useState(false); - const src = 'http://localhost:8000/' + props.src; + const src = process.env.REACT_APP_API_URL + '/' + props.src; return (