From 2b5f058dd352a90f7de0e50c65bdcd331516eb88 Mon Sep 17 00:00:00 2001 From: Bastian Meissner Date: Wed, 3 Jun 2020 11:54:56 +0200 Subject: [PATCH] Changed json filepath --- src/components/appList.js | 2 +- src/components/bookmarkList.js | 2 +- src/components/searchBar.js | 2 +- src/components/settingsModal.js | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/components/appList.js b/src/components/appList.js index c292b0e..57f775e 100644 --- a/src/components/appList.js +++ b/src/components/appList.js @@ -56,7 +56,7 @@ const useAppData = () => { const [appData, setAppData] = useState({ apps: [], error: false }); const fetchAppData = useCallback(() => { (process.env.NODE_ENV === 'production' - ? fetch('/apps.json').then(handleResponse) + ? fetch('/data/apps.json').then(handleResponse) : import('./data/apps.json') ) .then(jsonResponse => { diff --git a/src/components/bookmarkList.js b/src/components/bookmarkList.js index 0de7233..f061661 100644 --- a/src/components/bookmarkList.js +++ b/src/components/bookmarkList.js @@ -47,7 +47,7 @@ const useBookmarkData = () => { const fetchBookmarkData = useCallback(() => { (process.env.NODE_ENV === 'production' - ? fetch('/bookmarks.json').then(handleResponse) + ? fetch('/data/bookmarks.json').then(handleResponse) : import('./data/bookmarks.json') ) .then(jsonResponse => { diff --git a/src/components/searchBar.js b/src/components/searchBar.js index 1e29946..dc82526 100644 --- a/src/components/searchBar.js +++ b/src/components/searchBar.js @@ -23,7 +23,7 @@ const useSearchProviders = () => { const fetchSearchProviders = useCallback(() => { (process.env.NODE_ENV === 'production' - ? fetch('/search.json').then(handleResponse) + ? fetch('/data/search.json').then(handleResponse) : import('./data/search.json') ) .then(jsonResponse => { diff --git a/src/components/settingsModal.js b/src/components/settingsModal.js index e8898cc..6fd7b13 100644 --- a/src/components/settingsModal.js +++ b/src/components/settingsModal.js @@ -113,7 +113,7 @@ const useThemeData = () => { const [themeData, setThemeData] = useState({ themes: [], error: false }); const fetchThemeData = useCallback(() => { (process.env.NODE_ENV === 'production' - ? fetch('/themes.json').then(handleResponse) + ? fetch('/data/themes.json').then(handleResponse) : import('./data/themes.json') ) .then(jsonResponse => {