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 (