Fix next image width types
This commit is contained in:
parent
14d69a167e
commit
8307e59712
@ -1,5 +1,5 @@
|
|||||||
import { Photo } from '..';
|
import { Photo } from '..';
|
||||||
import { NextCustomSize } from '@/utility/image';
|
import { NextImageWidth } from '@/utility/image';
|
||||||
import { formatModelShort } from '@/utility/exif';
|
import { formatModelShort } from '@/utility/exif';
|
||||||
import { AiFillApple } from 'react-icons/ai';
|
import { AiFillApple } from 'react-icons/ai';
|
||||||
import ImageCaption from './components/ImageCaption';
|
import ImageCaption from './components/ImageCaption';
|
||||||
@ -13,7 +13,7 @@ export default function PhotoImageResponse({
|
|||||||
fontFamily,
|
fontFamily,
|
||||||
}: {
|
}: {
|
||||||
photo: Photo
|
photo: Photo
|
||||||
width: NextCustomSize
|
width: NextImageWidth
|
||||||
height: number
|
height: number
|
||||||
fontFamily: string
|
fontFamily: string
|
||||||
}) {
|
}) {
|
||||||
|
|||||||
@ -1,10 +1,8 @@
|
|||||||
import { BASE_URL } from '@/site/config';
|
import { BASE_URL } from '@/site/config';
|
||||||
|
|
||||||
// Explicity defined next.config.js `imageSizes`
|
// Explicity defined next.config.js `imageSizes`
|
||||||
export type NextCustomSize =
|
type NextCustomSize = 200 | 400 | 1050;
|
||||||
200 | 400 | 1050;
|
type NextImageDeviceSize = 640 | 750 | 828 | 1080 | 1200 | 1920 | 2048 | 3840;
|
||||||
export type NextImageDeviceSize =
|
|
||||||
640 | 750 | 828 | 1080 | 1200 | 1920 | 2048 | 3840;
|
|
||||||
|
|
||||||
export type NextImageWidth = NextCustomSize | NextImageDeviceSize;
|
export type NextImageWidth = NextCustomSize | NextImageDeviceSize;
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user