Skip to content

Commit e177415

Browse files
Use relative paths for base tag compatibility
Absolute paths (starting with /) bypass the <base> tag. Change to relative paths so the middleware proxy works correctly.
1 parent fb0f8ec commit e177415

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

frontend/app/page.tsx

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -39,14 +39,14 @@ export default function Dashboard() {
3939
useEffect(() => {
4040
async function loadImageList() {
4141
try {
42-
const response = await fetch('/image-list.json')
42+
const response = await fetch('image-list.json')
4343
if (response.ok) {
4444
const data = await response.json()
4545
const imageList: ImageData[] = data.images.map((imageName: string) => ({
4646
id: imageName,
47-
thumbnailPath: `/thumbnails/${imageName}.jpg`,
48-
imagePath: `/downsampled/${imageName}.jpg`,
49-
annotationPath: `/annotations/nsd/${imageName}_annotations.json`
47+
thumbnailPath: `thumbnails/${imageName}.jpg`,
48+
imagePath: `downsampled/${imageName}.jpg`,
49+
annotationPath: `annotations/nsd/${imageName}_annotations.json`
5050
}))
5151
setImages(imageList)
5252
} else {
@@ -108,7 +108,7 @@ export default function Dashboard() {
108108
async function loadAnnotationsForImage(imageId: string) {
109109
setImageLoading(true)
110110
try {
111-
const response = await fetch(`/annotations/nsd/${imageId}_annotations.json`)
111+
const response = await fetch(`annotations/nsd/${imageId}_annotations.json`)
112112
if (response.ok) {
113113
const data = await response.json()
114114
setAnnotations(prev => ({ ...prev, [imageId]: data.annotations || [] }))
@@ -182,7 +182,7 @@ export default function Dashboard() {
182182
className="flex items-center gap-3 md:gap-4 hover:opacity-90 transition-opacity"
183183
>
184184
<img
185-
src="/AGI-square.svg"
185+
src="AGI-square.svg"
186186
alt="AGI Logo"
187187
className="w-10 h-10 md:w-12 md:h-12"
188188
/>

0 commit comments

Comments
 (0)