import Page from 'components/core/Page/Page' ; import { useEffect } from 'react' ; import { useRouter } from 'next/router' ; type Props = { to : string ; } ; export default function GalleryRedirect ( { to } ) { const { replace } = useRouter ( ) ; useEffect ( ( ) => { void replace ( to ) ; } , [ replace , to ] ) ; return < Page />; }