<Route
component={() => logged ? <Product /> : <Redirect to='/' />}
exact
path='/products/:id'
/>
<Route
component={Product}
exact
path='/products/:id'
/>
<Route
render = { props => logged ? <Product /> : <Redirect to='/' /> }
exact
path='/products/:id'
/>