import React from 'react' import Link from 'next/link' import { useRouter } from 'next/router' export async function getServerSideProps({ params, query }) { return { world: 'world', query: query || {}, params: params || {}, time: new Date().getTime(), random: Math.random(), } } export default ({ world, time, params, random, query }) => { return ( <>

hello: {world}

time: {time}
{random}
{JSON.stringify(params)}
{JSON.stringify(query)}
{JSON.stringify(useRouter().query)}
to home
to another ) }