🐛 fix(App.tsx): change fetch URL to relative path to fix incorrect API call
The fetch URL was incorrect and was calling the API with an absolute path instead of a relative path. This caused the API call to fail. The URL has been changed to a relative path to fix the issue.
This commit is contained in:
parent
bc07766575
commit
61207db4da
1 changed files with 1 additions and 1 deletions
|
|
@ -49,7 +49,7 @@ export default function App() {
|
|||
// Initialize state variable for the version
|
||||
const [version, setVersion] = useState("");
|
||||
useEffect(() => {
|
||||
fetch("api/v1/version")
|
||||
fetch("/version")
|
||||
.then((res) => res.json())
|
||||
.then((data) => {
|
||||
setVersion(data.version);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue