9 lines
213 B
JavaScript
9 lines
213 B
JavaScript
|
import { withRouter } from 'next/router'
|
||
|
|
||
|
function RouterMethodSSR ({ router }) {
|
||
|
if (typeof window === 'undefined') router.push('/a')
|
||
|
return <p>Navigating...</p>
|
||
|
}
|
||
|
|
||
|
export default withRouter(RouterMethodSSR)
|