microbiomedata / nmdc-server

Data portal client and server for NMDC.
https://data.microbiomedata.org
Other
9 stars 0 forks source link

All "Resources" navigation menu items point to incorrect URLs #1195

Closed eecavanna closed 6 months ago

eecavanna commented 6 months ago

All of the URLs to which the items in the "Resources" menu in the Data Portal's navigation menu point, are incorrect.

image

For example:

image

For reference: The last time the menus.ts file was updated was 3 weeks ago, by me, via https://github.com/microbiomedata/nmdc-server/pull/1178.

Looks to me like something is treating something as a relative path instead of an absolute URL.

I'm labeling this as priority:high since GSP is next week.

eecavanna commented 6 months ago

I reproduced this in my local development environment

image

eecavanna commented 6 months ago

I think the root cause is that, in menus.ts, the links in that menu are specified using the to property instead of the href property:

https://github.com/microbiomedata/nmdc-server/blob/d1a0bb532aeec8781511c4af6ffcc7ee2bbb7773/web/src/menus.ts#L50-L73

For comparison

I think href is "for" absolute URLs:

https://github.com/microbiomedata/nmdc-server/blob/d1a0bb532aeec8781511c4af6ffcc7ee2bbb7773/web/src/menus.ts#L28

I think to is "for" relative paths:

https://github.com/microbiomedata/nmdc-server/blob/d1a0bb532aeec8781511c4af6ffcc7ee2bbb7773/web/src/menus.ts#L41