Skip to content

Commit 6efe63d

Browse files
committed
fix: 파란색 날짜 박스 렌더링 조건 수정
1 parent 57cf9b1 commit 6efe63d

File tree

1 file changed

+16
-6
lines changed

1 file changed

+16
-6
lines changed

breifing/src/pages/Home.js

+16-6
Original file line numberDiff line numberDiff line change
@@ -84,13 +84,23 @@ const Home = () => {
8484
<Header />
8585
{news.map((newsItem, index) => (
8686
<React.Fragment key={index}>
87-
{newsItem.date && index !== 0 && (
88-
<div className="my-4 mx-auto flex justify-center sm:justify-start sm:px-16 py-2 text-base text-[#306DAB] w-[calc(100%-1rem)] rounded-lg xl:w-[1200px] bg-[#0072E721]">
89-
{formatDateWithDay(new Date(newsItem.date))}{" "}
90-
{newsItem.timeOfDay === "Morning" ? "아침" : "저녁"} 브리핑
91-
</div>
87+
{newsItem.date && (
88+
<>
89+
<div
90+
className={`my-4 flex justify-center sm:justify-start mx-auto sm:px-16 py-2 text-base text-[#306DAB] w-[calc(100%-4rem)] xl:w-[1200px] rounded-lg bg-[#0072E721] ${
91+
index === 0 ? "flex sm:hidden" : ""
92+
}`}
93+
>
94+
{formatDateWithDay(new Date(newsItem.date))}{" "}
95+
{newsItem.timeOfDay === "Morning" ? "아침" : "저녁"} 브리핑
96+
</div>
97+
<div
98+
className={`bg-black h-[1px] my-4 mx-auto px-2 w-[calc(100%-1rem)] xl:w-[1170px] ${
99+
index === 0 ? "flex sm:hidden" : ""
100+
}`}
101+
></div>
102+
</>
92103
)}
93-
94104
{category === "전체" || category === "사회" ? (
95105
<React.Fragment>
96106
<SocialBox

0 commit comments

Comments
 (0)