🐛 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:
Gabriel Luiz Freitas Almeida 2023-06-09 17:17:55 -03:00
commit 61207db4da

View file

@ -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);