Skip to content

Commit

Permalink
fix: 메인화면 CLS
Browse files Browse the repository at this point in the history
  • Loading branch information
yeolyi committed Jan 12, 2025
1 parent cc59b23 commit f3d0994
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions components/common/Image.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
'use client';

import clsx from 'clsx';
// eslint-disable-next-line no-restricted-imports
import NextImage, { getImageProps } from 'next/image';
import { ComponentProps } from 'react';
Expand All @@ -14,6 +15,13 @@ export default function Image(props: ComponentProps<typeof NextImage>) {
return (
<img
{...delegated}
className={clsx(
{
// 메인화면 background.png에 CLS가 발생해 수동으로 처리
absolute: props.fill,
},
props.className,
)}
alt={alt}
{...useStyle((_style) => {
Object.assign(_style, style);
Expand Down

0 comments on commit f3d0994

Please sign in to comment.