import React from 'react' ; import { useRouter } from 'next/router' ; import { ImagePublic } from '@dark-rush-photography/shared/types' ; import { SlugPage } from '@dark-rush-photography/best-of/feature' ; interface Props { images : ImagePublic [ ] ; } function Index ( props ) { const router = useRouter ( ) ; function displayImageHandler ( image ) { router . push ( `/nature/${ image . threeSixtyImageStorageId ? image . threeSixtyImageStorageId : image . storageId }` ) ; } return < SlugPage images = { props . images } displayImage = { displayImageHandler } / > ; } export async function getStaticProps ( ) { return { props : { images : [ { } ] as ImagePublic [ ] , } , } ; } export default Index ;