11import { QueryDatabaseResponse } from '@notionhq/client/build/src/api-endpoints' ;
22import Head from 'next/head' ;
3+ import Image from 'next/image' ;
34import Link from 'next/link' ;
45import React from 'react' ;
56import { useMeasure } from 'react-use' ;
67import { Text } from '../components/article/text' ;
78import Footer from '../components/homepage/footer' ;
89import Header from '../components/homepage/header' ;
9- import { Image , signImageUrl } from '../components/image/imgix' ;
1010import { getItemsFromDatabase } from '../lib/notion' ;
1111import styles from './index.module.css' ;
1212
@@ -28,19 +28,12 @@ const Photo = (props: { post: IProps['photos'][0] }) => {
2828 const url = ( props . post . properties . Cover as any ) ?. files [ 0 ] ?. file . url ;
2929 const slug = ( props . post . properties . Slug as any ) . rich_text [ 0 ] ?. plain_text ;
3030 const normalizedWidth = width < 297 ? 297 : width ;
31- const { src, srcSet } = signImageUrl ( url , normalizedWidth , normalizedWidth ) ;
3231 return (
3332 < div className = { styles . gridItem } ref = { ref } >
34- { src && (
33+ { url && (
3534 < Link href = { `/photos/${ slug } ` } >
3635 < a className = { styles . photoLinkImage } >
37- < Image
38- src = { src }
39- srcSet = { srcSet }
40- width = { normalizedWidth }
41- height = { normalizedWidth }
42- alt = { title }
43- />
36+ < Image src = { url } width = { normalizedWidth } height = { normalizedWidth } alt = { title } />
4437 </ a >
4538 </ Link >
4639 ) }
0 commit comments