BuddhaNexus / buddhanexus-frontend-next

BuddhaNexus Frontend 2.0
buddhanexus-frontend-next.vercel.app
2 stars 1 forks source link

Links at bottom of menu #139

Open ayya-vimala opened 2 months ago

ayya-vimala commented 2 months ago

Image

All the sites are mentioned at the bottom of the menu and not just the ones that are relevant for the text in question. So for a Pali text this should be only SC (for DN, MN, AN, SN and KN) and VRI for all pali texts. Same with the other languages. The /links/external/ API call gives back which links are relevant. For instance it gives back:

{
  "bdrc": "False",
  "rkts": "False",
  "gretil": "False",
  "dsbc": "False",
  "cbeta": "False",
  "suttacentral": "https://suttacentral.net/dn5",
  "cbc": "False",
  "vri": "https://www.tipitaka.org/romn/"
}
ayya-vimala commented 1 month ago

I guess I could have it filter the backend to give back only those that are not false, but would that work with the typescript?

aminahbl commented 1 month ago

It didn't used to render this way. My guess is there some small bit of logic that needs to be updated.

aminahbl commented 1 month ago

Yeah I see what's going on, I think the BE used to return a null value, which the FE checked against, not it returns "False" which as a string with length is truthy. Will fix.