Uploaded image for project: 'OpenShift Bugs'
  1. OpenShift Bugs
  2. OCPBUGS-48080

The documentation for HorizontalNav seems to contain a mistake

XMLWordPrintable

    • Quality / Stability / Reliability
    • False
    • Hide

      None

      Show
      None
    • 2
    • None
    • None
    • None
    • None
    • None
    • OSDOCS Sprint 268
    • 1
    • In Progress
    • Release Note Not Required
    • None
    • None
    • None
    • None
    • None

      In th documentation, the code chunk below showing that the value in the `href` field should start with a `/`, in practice we've experienced that adding slashes in the `href` fields was causing troubles in the handling of the urls. In short the HorizontalNav would append new bits of url to the current one instead of replacing the last term.

      const HomePage: React.FC = (props) => {
          const page = {
            href: '/home',
            name: 'Home',
            component: () => <>Home</>
          }
          return <HorizontalNav match={props.match} pages={[page]} />
      }
      

              rhn-support-opayne Olivia Payne
              tlavocat@redhat.com Thomas Lavocat
              None
              None
              Sanket Pathak Sanket Pathak
              None
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

                Created:
                Updated:
                Resolved: