Skip to content

Commit

Permalink
fix: ios 웹뷰에서 height 길어지는 현상 수정
Browse files Browse the repository at this point in the history
  • Loading branch information
sap03110 committed Dec 6, 2023
1 parent 52b4257 commit 257b4b2
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/components/ui/image/index.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import { SerializedStyles, css } from '@emotion/react';
import classNames from 'classnames';
import { CSSProperties } from 'react';
import { IMAGE_URL } from '@/apis/urls';

const imageWrapStyle = css`
Expand Down Expand Up @@ -40,6 +41,7 @@ const Image = ({
isLazy = false,
css,
height,
style,
className = '',
}: {
height?: string;
Expand All @@ -48,10 +50,12 @@ const Image = ({
isLazy?: boolean;
css?: SerializedStyles;
className?: string;
style?: CSSProperties;
}) => (
<div
css={{ ...imageWrapStyle, ...css }}
className={classNames('image', className)}
style={style}
>
<img
src={src?.includes('//') ? src : IMAGE_URL + src}
Expand Down
1 change: 1 addition & 0 deletions src/pages/your-page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -139,6 +139,7 @@ const YourPage: React.FC = () => {
src={item.photoUrls[0]}
alt={item.category}
className="image"
style={{ maxHeight: '33vw' }}
/>
</Link>
</GridItem>
Expand Down

0 comments on commit 257b4b2

Please sign in to comment.