1
0
Fork 0

Fix version display regression

This commit is contained in:
Massimiliano D. 2025-09-30 15:42:04 +02:00 committed by GitHub
parent b0a6c40c33
commit 6aaae0e6f7
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -1,5 +1,7 @@
import { createContext, ReactNode, useEffect, useState } from 'react'
import { BASE_PATH } from 'libs/utils'
type VersionContextProps = {
showHubButton: boolean
version: string
@ -21,7 +23,7 @@ export const VersionProvider = ({ children }: VersionProviderProps) => {
useEffect(() => {
const fetchVersion = async () => {
try {
const response = await fetch('/api/version')
const response = await fetch(`${BASE_PATH}/version`)
if (!response.ok) {
throw new Error(`Network error: ${response.status}`)
}