changed .env path
This commit is contained in:
parent
6d2f313eb3
commit
353a9c4981
2
.env
2
.env
@ -1 +1 @@
|
|||||||
REACT_APP_API_URL=http://localhost:8000
|
REACT_APP_API_URL=https://dmitriy.icu:433
|
@ -23,7 +23,7 @@ const Gallery = props => {
|
|||||||
useEffect( () => {
|
useEffect( () => {
|
||||||
const fetchData = async () => {
|
const fetchData = async () => {
|
||||||
try {
|
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) {
|
if (!res.ok) {
|
||||||
throw Error(res.statusText);
|
throw Error(res.statusText);
|
||||||
|
@ -4,7 +4,7 @@ import './GalleryItem.scss';
|
|||||||
|
|
||||||
const GalleryItem = props => {
|
const GalleryItem = props => {
|
||||||
const [showViewBox, setShowViewbox] = useState(false);
|
const [showViewBox, setShowViewbox] = useState(false);
|
||||||
const src = 'http://localhost:8000/' + props.src;
|
const src = process.env.REACT_APP_API_URL + '/' + props.src;
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className="galleryItem" >
|
<div className="galleryItem" >
|
||||||
|
Loading…
x
Reference in New Issue
Block a user