From 1a91015486bcc8c54f11c30d01d324feeb0e431f Mon Sep 17 00:00:00 2001 From: "Campbell, Justin" Date: Thu, 4 Feb 2021 14:23:53 -0500 Subject: [PATCH] Prepend API calls with subdirectory path --- src/components/AppView/AppView.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/components/AppView/AppView.js b/src/components/AppView/AppView.js index 5018059..e849647 100644 --- a/src/components/AppView/AppView.js +++ b/src/components/AppView/AppView.js @@ -41,7 +41,7 @@ export default function AppView({ setDarkMode }){ myHeaders.append("Authorization", `Bearer ${access_token}`); let requestOptions = { headers: myHeaders }; - const apiResponse = await fetch(`/api/data/${queuesToLoad}`, requestOptions); + const apiResponse = await fetch(`${process.env.PUBLIC_URL}/api/data/${queuesToLoad}`, requestOptions); const queueJson = await apiResponse.json(); setQueues(queueJson); } else { @@ -140,4 +140,4 @@ export default function AppView({ setDarkMode }){ AppView.propTypes = {}; -AppView.defaultProps = {}; \ No newline at end of file +AppView.defaultProps = {};