iterative / gatsby-theme-iterative

A Gatsby theme for shared logic between all the websites from iterative.ai
https://iterative.ai/
BSD Zero Clause License
6 stars 1 forks source link

fix(sidebar): set next/prev properly on deep nested tree #201

Closed shcheklein closed 1 year ago

shcheklein commented 1 year ago

Fixes #200

The issue was in not going deep in enough in children hierarchy to set the "previous" item pointer. It was setting it only to the next level of children:

- first item
  - nested item <--- it would always pick this as a previous while processing the `second item` below
     - nested nested item
        - - nested nested nested item <--- we should go down the tree to the bottom to find the deepest child
- second item