import React from 'react' ; import { NextPageContext } from 'next' ; export default function protectedPage ( ) { return < div > Protected Page < /div>; } export const getServerSideProps = ( ctx ) : any => ( global as any ) . withPageAuthRequired ( ) ( ctx ) ;