-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #13 from hyundai-autoever-first-project-team3/chae…
…lin3 Chaelin3
- Loading branch information
Showing
4 changed files
with
59 additions
and
27 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,28 +1,49 @@ | ||
import React from "react"; | ||
import { Button, IconButton } from "@mui/material"; | ||
import { Button } from "@mui/material"; | ||
import FavoriteIcon from "@mui/icons-material/Favorite"; | ||
|
||
function InfoBar() { | ||
const InfoBar = ({ | ||
id, | ||
createdAt, | ||
updatedAt, | ||
writerNickname, | ||
likeCount = 0, | ||
onClick, | ||
}) => { | ||
// 날짜 가공 | ||
const formattedDate = new Date(createdAt).toLocaleDateString("ko-KR", { | ||
year: "numeric", | ||
month: "long", | ||
day: "numeric", | ||
}); | ||
|
||
return ( | ||
<div> | ||
<div className="flex justify-between items-center"> | ||
<div> | ||
<span className="font-bold" style={{ marginRight: "1rem" }}> | ||
고채린 | ||
</span> | ||
<span>2024년 10월 21일</span> | ||
<span>{createdAt}</span> | ||
</div> | ||
<div> | ||
{/* 로그인 여부에 따라 버튼 노출 달라짐 */} | ||
<div className="flex"> | ||
<Button variant="outlined">삭제</Button> | ||
<Button variant="outlined">수정</Button> | ||
</div> | ||
<Button | ||
variant="outlined" | ||
color="#eee" | ||
startIcon={<FavoriteIcon sx={{ color: "#F20789" }} />} | ||
sx={{ borderRadius: "1rem" }} | ||
> | ||
101 | ||
</Button> | ||
</div> | ||
<Button | ||
variant="outlined" | ||
color="#eee" | ||
startIcon={<FavoriteIcon sx={{ color: "#F20789" }} />} | ||
sx={{ borderRadius: "1rem" }} | ||
> | ||
101 | ||
</Button> | ||
</div> | ||
</div> | ||
); | ||
} | ||
}; | ||
|
||
export default InfoBar; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters