fix(v2): version display — correct URL path (/api/api-version)
apiFetch adds /api prefix, so /api-version became /api/api-version which was wrong. Use raw fetch with correct path. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
a59296867d
commit
6b0b26c287
4 changed files with 9 additions and 8 deletions
|
|
@ -29,7 +29,8 @@ export const MapLayout: React.FC<Props> = ({ data, onViewToggle }) => {
|
|||
|
||||
const [version, setVersion] = useState('');
|
||||
useEffect(() => {
|
||||
apiFetch<{ version: string }>('/api-version').then(d => setVersion(d.version ?? '')).catch(() => {});
|
||||
// /api-version is the actual route — apiFetch adds /api prefix, so use raw fetch
|
||||
fetch('/api/api-version', { credentials: 'include' }).then(r => r.json()).then(d => setVersion(d.version ?? '')).catch(() => {});
|
||||
}, []);
|
||||
|
||||
const handleSelectPlayer = useCallback((name: string) => {
|
||||
|
|
|
|||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
|
@ -5,7 +5,7 @@
|
|||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||
<title>Mosswart Overlord v2</title>
|
||||
<link rel="icon" type="image/png" href="/icons/7735.png" />
|
||||
<script type="module" crossorigin src="/v2/assets/index-Cl1VRDup.js"></script>
|
||||
<script type="module" crossorigin src="/v2/assets/index-enmZs0AR.js"></script>
|
||||
<link rel="stylesheet" crossorigin href="/v2/assets/index-LcLAhCFL.css">
|
||||
</head>
|
||||
<body>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue