Merged in fix/3697-prettier-configs (pull request #3396)
fix(SW-3691): Setup one prettier config for whole repo * Setup prettierrc in root and remove other configs Approved-by: Joakim Jäderberg Approved-by: Linus Flood
This commit is contained in:
@@ -1,21 +1,21 @@
|
||||
'use client'
|
||||
"use client"
|
||||
|
||||
import NextImage, { ImageProps as NextImageProps } from 'next/image'
|
||||
import NextImage, { ImageProps as NextImageProps } from "next/image"
|
||||
|
||||
import ImageFallback from '../ImageFallback'
|
||||
import ImageFallback from "../ImageFallback"
|
||||
|
||||
import { useState, type CSSProperties, type SyntheticEvent } from 'react'
|
||||
import { imageLoader } from './imageLoader'
|
||||
import { useState, type CSSProperties, type SyntheticEvent } from "react"
|
||||
import { imageLoader } from "./imageLoader"
|
||||
|
||||
type FocalPoint = {
|
||||
x: number
|
||||
y: number
|
||||
}
|
||||
|
||||
export type ImageProps = Omit<NextImageProps, 'src'> & {
|
||||
export type ImageProps = Omit<NextImageProps, "src"> & {
|
||||
focalPoint?: FocalPoint
|
||||
dimensions?: { width: number; height: number }
|
||||
src: NextImageProps['src'] | undefined
|
||||
src: NextImageProps["src"] | undefined
|
||||
}
|
||||
|
||||
// Next/Image adds & instead of ? before the params
|
||||
@@ -30,7 +30,7 @@ export default function Image({
|
||||
const [imageError, setImageError] = useState(false)
|
||||
const styles: CSSProperties = focalPoint
|
||||
? {
|
||||
objectFit: 'cover',
|
||||
objectFit: "cover",
|
||||
objectPosition: `${focalPoint.x}% ${focalPoint.y}%`,
|
||||
...style,
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user