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 40245ec
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
5 changes: 5 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 All @@ -16,6 +17,7 @@ const imageWrapStyle = css`
> img {
width: inherit;
height: inherit;
max-height: 132px;
position: absolute;
}
Expand All @@ -40,6 +42,7 @@ const Image = ({
isLazy = false,
css,
height,
style,
className = '',
}: {
height?: string;
Expand All @@ -48,10 +51,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 40245ec

Please sign in to comment.