Skip to content

Commit

Permalink
Fix help content fetch path (#89)
Browse files Browse the repository at this point in the history
* use vite's BASE_URL environment variable for retrieving help content files

* 0.7.1
  • Loading branch information
dpgraham4401 authored Mar 26, 2024
1 parent d16b634 commit 031b21b
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "the-manifest-game",
"private": true,
"version": "0.7.0",
"version": "0.7.1",
"type": "module",
"scripts": {
"dev": "vite",
Expand Down
2 changes: 1 addition & 1 deletion src/hooks/useFetchHelp/useFetchHelp.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ export const useFetchHelp = (nodeId?: string) => {
useEffect(() => {
setIsLoading(true);
if (nodeId) {
fetch(`/help/${nodeId}.json`)
fetch(`${import.meta.env.BASE_URL}help/${nodeId}.json`)
.then((response) => {
if (!response.ok) {
throw new Error('There was a problem fetching help.');
Expand Down

0 comments on commit 031b21b

Please sign in to comment.