Skip to content

Commit

Permalink
fix: 메인 배너 그림자 안보이는 문제
Browse files Browse the repository at this point in the history
  • Loading branch information
yeolyi committed Apr 7, 2024
1 parent 4d72e9d commit 5afb182
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 8 deletions.
6 changes: 2 additions & 4 deletions components/main/NewsCard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,12 @@ import { formatMainNewsDateStr } from '@/utils/date';

import { CARD_WIDTH_REM } from './constants';

export default function NewsCard({ shadow, news }: { shadow: boolean; news: MainNews }) {
export default function NewsCard({ news }: { news: MainNews }) {
return (
<Link
href={`/community/news/${news.id}`}
style={{ width: `${CARD_WIDTH_REM}rem` }}
className={`flex h-[19rem] shrink-0 flex-col bg-neutral-50 ${
shadow ? 'shadow-[0_0_31.9px_0_rgba(0,0,0,0.07)]' : ''
}`}
className="flex h-[19rem] shrink-0 flex-col bg-neutral-50 shadow-[0_0_31.9px_0_rgba(0,0,0,0.07)]"
>
<div className="relative h-[6.25rem] w-full">
<Image src={news.imageURL} fill alt="" className="object-cover" sizes="100px" />
Expand Down
4 changes: 2 additions & 2 deletions components/main/NewsCarousel.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@ export default function NewsCarousel({ news }: { news: MainNews[] }) {
gap: `${CARD_GAP_REM}rem`,
}}
>
{news.map((news, idx) => (
<NewsCard key={news.id} news={news} shadow={idx % 4 !== 0} />
{news.map((news) => (
<NewsCard key={news.id} news={news} />
))}
</div>
</div>
Expand Down
4 changes: 2 additions & 2 deletions components/main/NewsCarouselMobile.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ import NewsCard from './NewsCard';
export default function NewsCarouselMobile({ news }: { news: MainNews[] }) {
return (
<div className="no-scrollbar mr-5 flex gap-5 overflow-auto">
{news.map((news, idx) => (
<NewsCard key={news.id} news={news} shadow={idx % 4 !== 0} />
{news.map((news) => (
<NewsCard key={news.id} news={news} />
))}
</div>
);
Expand Down

0 comments on commit 5afb182

Please sign in to comment.