import React from 'react' import Link from 'next/link' import Router, { withRouter } from 'next/router' const href = { pathname: '/about', query: { name: 'zeit' } } const as = { pathname: '/about/zeit', hash: 'title-1' } const handleClick = () => Router.push(href, as) export default withRouter(({ router: { query } }) => (

About {query.name}

{query.name === 'zeit' ? ( Go to home page ) : ( )}
))