@@ -39,15 +39,14 @@ export default function Dashboard() {
3939 useEffect ( ( ) => {
4040 async function loadImageList ( ) {
4141 try {
42- const basePath = process . env . NEXT_PUBLIC_BASE_PATH || ''
43- const response = await fetch ( `${ basePath } /image-list.json` )
42+ const response = await fetch ( '/image-list.json' )
4443 if ( response . ok ) {
4544 const data = await response . json ( )
4645 const imageList : ImageData [ ] = data . images . map ( ( imageName : string ) => ( {
4746 id : imageName ,
48- thumbnailPath : `${ basePath } /thumbnails/${ imageName } .jpg` ,
49- imagePath : `${ basePath } /downsampled/${ imageName } .jpg` ,
50- annotationPath : `${ basePath } /annotations/nsd/${ imageName } _annotations.json`
47+ thumbnailPath : `/thumbnails/${ imageName } .jpg` ,
48+ imagePath : `/downsampled/${ imageName } .jpg` ,
49+ annotationPath : `/annotations/nsd/${ imageName } _annotations.json`
5150 } ) )
5251 setImages ( imageList )
5352 } else {
@@ -109,8 +108,7 @@ export default function Dashboard() {
109108 async function loadAnnotationsForImage ( imageId : string ) {
110109 setImageLoading ( true )
111110 try {
112- const basePath = process . env . NEXT_PUBLIC_BASE_PATH || ''
113- const response = await fetch ( `${ basePath } /annotations/nsd/${ imageId } _annotations.json` )
111+ const response = await fetch ( `/annotations/nsd/${ imageId } _annotations.json` )
114112 if ( response . ok ) {
115113 const data = await response . json ( )
116114 setAnnotations ( prev => ( { ...prev , [ imageId ] : data . annotations || [ ] } ) )
@@ -184,7 +182,7 @@ export default function Dashboard() {
184182 className = "flex items-center gap-3 md:gap-4 hover:opacity-90 transition-opacity"
185183 >
186184 < img
187- src = { ` ${ process . env . NEXT_PUBLIC_BASE_PATH || '' } /AGI-square.svg` }
185+ src = " /AGI-square.svg"
188186 alt = "AGI Logo"
189187 className = "w-10 h-10 md:w-12 md:h-12"
190188 />
0 commit comments