Skip to content

Commit

Permalink
fix fetch url for stats
Browse files Browse the repository at this point in the history
  • Loading branch information
joneugster committed Sep 29, 2024
1 parent 3cdb9a0 commit 1466a41
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions client/src/components/landing_page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ function LandingPage() {

/** Parse `games/stats.csv` if present and display server capacity. */
React.useEffect(() => {
fetch('games/stats.csv')
fetch(`${window.location.origin}/data/stats`)
.then(response => {if (response.ok) {
return response.text() } else {throw ""}})
.then(data => {
Expand All @@ -138,8 +138,7 @@ function LandingPage() {
setUsageMem(100 * Number(values[1]));
}
}).catch(err => {
console.info('games/stats.csv does not exist')
console.info(err)
console.info('stats.csv does not exist.')
})


Expand Down

0 comments on commit 1466a41

Please sign in to comment.