changed .env path

This commit is contained in:
Dmitriy Shishkov 2020-03-31 13:49:31 +05:00
parent 6d2f313eb3
commit 353a9c4981
3 changed files with 3 additions and 3 deletions

2
.env
View File

@ -1 +1 @@
REACT_APP_API_URL=http://localhost:8000
REACT_APP_API_URL=https://dmitriy.icu:433

View File

@ -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);

View File

@ -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 (
<div className="galleryItem" >