0

In the application the navigation appears single in all the pages except the home which is '/'.

How do I prevent the navigation from appearing twice in the home. Here is a screenshot and the code for the react-router.

Screen Shot OF Double Menu In React-Router: enter image description here

Here is the code:

class App extends Component {
  render() {
    return ( 
     <BrowserRouter>
        <div>
            <Navigator />
            <Switch>
                <Route path='/'exact strict component ={HomeIndex} />
                <Route path='/Pricing' exact component ={Pricing} />
                <Route component={Error404}/>
            </Switch>
        </div>
     </BrowserRouter>
    );
  }
}
c-chavez
  • 7,237
  • 5
  • 35
  • 49

1 Answers1

0

Once check your HomeIndex component, may be you are using <Navigator /> again inside HomeIndex component.

Jaisa Ram
  • 1,687
  • 14
  • 21