Skip to content

Commit 3d8bb0e

Browse files
authored
Merge pull request #136 from Moaguide-develop/feat/productpage
Feat/productpage
2 parents 446d6ae + fdf25aa commit 3d8bb0e

File tree

2 files changed

+7
-5
lines changed

2 files changed

+7
-5
lines changed

src/components/home/MainReportItem.tsx

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import type { MainReportType } from '@/types/homeComponentsType';
33
import { formatCategory } from '@/utils/formatCategory';
44
import { format, parseISO } from 'date-fns';
55
import React from 'react';
6-
6+
import Image from 'next/image';
77
const MainReportItem = ({ category, title, date, link, description, imageLink }: MainReportType) => {
88

99
const handleClick = () => {
@@ -22,9 +22,11 @@ const MainReportItem = ({ category, title, date, link, description, imageLink }:
2222
</div>
2323
{/* 오른쪽 */}
2424
<div className='h-full'>
25-
<img
25+
<Image
2626
src={imageLink}
2727
alt="img"
28+
width={90}
29+
height={75}
2830
className="w-[90px] h-[75px] sm:w-[132px] sm:h-[93px] rounded-[8px] mb-auto"
2931
/>
3032
</div>

src/components/product/Dividend.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -56,15 +56,15 @@ const Dividend = memo(({ dividend }: DividendProps) => {
5656
modules={[Navigation]}
5757
breakpoints={{
5858
320: {
59-
slidesPerView: 1,
59+
slidesPerView: dividend.length === 1 ? 1 : 2,
6060
spaceBetween: 10
6161
},
6262
480: {
63-
slidesPerView: 1,
63+
slidesPerView: dividend.length === 1 ? 1 : 2,
6464
spaceBetween: 10
6565
},
6666
640: {
67-
slidesPerView: 2,
67+
slidesPerView: dividend.length === 1 ? 1 : 2,
6868
spaceBetween: 10
6969
}
7070
}}

0 commit comments

Comments
 (0)