Skip to content

Commit

Permalink
Merge pull request #1131 from kkhys/staging
Browse files Browse the repository at this point in the history
Production deploy
  • Loading branch information
kkhys authored Jun 8, 2024
2 parents a14cf98 + 46fe715 commit d475e06
Showing 1 changed file with 8 additions and 13 deletions.
21 changes: 8 additions & 13 deletions apps/web/src/ui/post/blocks/image-block/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -49,22 +49,17 @@ export const ImageBlock = ({
src,
alt,
blurDataURL,
_width,
_height,
width,
height,
title,
}: Pick<ImageProps, 'blurDataURL' | 'title'> & {
src?: string;
alt?: string;
_width?: string | number;
_height?: string | number;
width?: string | number;
height?: string | number;
}) => {
const [isOpen, setOpen] = React.useState(false);

const parseDimension = (dim?: string | number) => (dim ? (typeof dim === 'string' ? parseFloat(dim) : dim) : 0);

const width = parseDimension(_width);
const height = parseDimension(_height);

React.useEffect(() => {
const handleScroll = () => {
if (isOpen) setOpen(false);
Expand All @@ -82,8 +77,8 @@ export const ImageBlock = ({
<NextImage
src={src}
alt={alt ?? ''}
width={width}
height={height}
width={width as number}
height={height as number}
blurDataURL={blurDataURL}
onClick={() => setOpen(!isOpen)}
layoutId={src}
Expand All @@ -100,8 +95,8 @@ export const ImageBlock = ({
<NextImage
src={src}
alt={alt ?? ''}
width={width}
height={height}
width={width as number}
height={height as number}
blurDataURL={blurDataURL}
onClick={() => setOpen(!isOpen)}
layoutId={src}
Expand Down

2 comments on commit d475e06

@vercel
Copy link

@vercel vercel bot commented on d475e06 Jun 8, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

me-web – ./apps/web

me-web-kkhys-team.vercel.app
me-web-ten.vercel.app
me-web-git-main-kkhys-team.vercel.app
kkhys.me
www.kkhys.me

@vercel
Copy link

@vercel vercel bot commented on d475e06 Jun 8, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.