withRouter( ({ staticContext, history, location, match, ...rest }: Props) => ( <Link {...rest} onClick={evt => { if (rest.onClick) rest.onClick(evt); if (evt.metaKey || evt.ctrlKey) return; if (window.appUpdateAvailable === true) { evt.preventDefault(); // This is copied from react-router's <Link /> component and is basically what it does internally const location = typeof rest.to === 'string' ? createLocation(rest.to, null, null, history.location) : rest.to; return (window.location = history.createHref(location)); } }} /> ) )
withRouter( ({history}) => fakeAuth.isAuthenticated ? ( <p> Welcome! <button onClick={() => {fakeAuth.signout( () => history.push('/'))}}>sign out</button> </p> ) : ( <p>You are not logged in bro :(</p> ) )
withRouter(props => ( <button onClick={() => setTimeout(() => { props.setAuth(false); props.history.push('/'); }, 100) } //fake async > Sign Out </button> ))
withRouter(props => { return ( <NavModal {...props} unmarked with={{ ...magazineSections(props.location.pathname) }} style={{ textDecoration: "none" }} > {props.children} </NavModal> ) })
withRouter(function Flash(props) { const { state } = props.location; if (state && state.flash) { return <p className='flash'>{state.flash}</p> } return false; })
withRouter(({history, match}) => ( fakeAuth.isAuthenticated ? ( <div> <Alert bsStyle='success'>Welcome!</Alert> <Button onClick={() => { fakeAuth.signout(() => history.push('/')) }}>Sign out</Button> </div> ) : ( <Alert bsStyle='warning'>You are NOT logged in</Alert> ) ))
withRouter(({ children, location }) => { return location && location.state && location.state.notFoundError ? ( <NotFound /> ) : ( children ); })
withRouter( ({ match }) => ( <Router> <Person match={{ params: { id: 0 },url:match.url}} /> </Router> ) )
withRouter( connect( store => ({ auth: store.auth, }), { getCurrentPoll }, )(RouteViews), )
withRouter(connect( function(state) { return { custom: state }; } )(Layout))
withRouter(({ history }) => ( isAuthenticated() ? ( <p> Welcome! <button onClick={() => { signout(() => history.push('/')) }}>Sign out</button> </p> ) : ( <p>You are not logged in. <Link to="/login">Login</Link></p> ) ))
withRouter(({ history }) => ( fakeAuth.isAuthenticated === true ? <p> Welcome! <button onClick={() => { fakeAuth.signout(() => history.push('/')) }}>Signout</button> </p> : <p> You are not logged in. </p> ))
withRouter(({ history }) => ( auth.isAuthenticated ? ( <p> Welcome! <button onClick={() => { auth.signout(() => history.push('/')) }}>Sign out</button> </p> ) : ( <p>You are not logged in.</p> ) ))
withRouter(function Flash(props) { const { state } = props.location; if (state && state.flash) { return <p>{state.flash}</p> } return false; })
withRouter(({history}) => ( fakeAuth.isAuthenticated ? ( <p> Welcome! <button onClick={() => { fakeAuth.signout(() => history.push('/')); }}>Sign out</button> </p> ) : ( <p>You are not logged in.</p> ) ))