Changed json filepath

This commit is contained in:
Bastian Meissner 2020-06-03 11:54:56 +02:00
parent 2fc18f6c60
commit 2b5f058dd3
4 changed files with 4 additions and 4 deletions

View file

@ -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 => {

View file

@ -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 => {

View file

@ -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 => {

View file

@ -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 => {