<Route path="/login" component={SignIn} /> <Route path="/posts" render = {() => (auth ? (<Post />) : (<Redirect to="/login" />))}/>