PrimeDAO / prime-deals-dapp

DAO to DAO negotiations facilitated, ratified, and archived.
https://www.prime.xyz/deals
3 stars 1 forks source link

Documentation: Missing color change on Text if the page is active #1087

Open BartuCulha opened 2 years ago

BartuCulha commented 2 years ago

Steps to reproduce:

  1. Navigate here: https://prime-deals-dapp-git-refac-deals-au2-curvelabs.vercel.app/documentation/TokenSwapFAQ
  2. Click any page using the left navigation box

Currently: Selected page is not highlighted Documentation-Token-Swap-FAQ-Prime-Deals.png

Expected: To highlight the selected page Token-Swap-FAQ-Documentation-Documentation-Prime-Deals.png

testing-life commented 2 years ago

this is cause by the router behaviour. initial navigation ends up with router.activeNavigation as undefined, which ends up always picking current index as 0, highlighting incorrect option. i've introduced below changes image navigation.instruction in load() gets picked correctly, so i tried setting it on component scope, to be picked up as fallback for currentDocIndex. this line seemed promising: const currentDoc = this.navInstructions;