Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat : 함께보기(홈) 프사 연동, 일기생성 말풍선 추가 #45

Merged
merged 1 commit into from
Aug 2, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions src/components/OtherDiaryCard/OtherDiaryCard.types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,5 @@ export interface NewDiaryCardProps {
photoUrl: string;
content: string;
createAt: string;
profileUrl: string;
}
9 changes: 9 additions & 0 deletions src/newPages/homeOther/HomeOther.styles.ts
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,15 @@ export const Tab = styled.button<{ active: boolean }>`
padding: 10px 0;
border: none;
border-bottom: ${({ active }) => (active ? "3px solid #000000" : "none")};
color: var(--Color-Styles-black-000, #151515);
text-align: center;

/* Text Styles/body1-bold */
font-family: Pretendard;
font-size: 16px;
font-style: normal;
font-weight: 700;
line-height: 150%; /* 24px */

cursor: pointer;
font-size: 16px;
Expand Down
4 changes: 3 additions & 1 deletion src/newPages/homeOther/HomeOther.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,8 @@ const HomeOther = () => {
likeCount: card.likeCount,
photoUrl: card.imageResDtoList[0].convertImageUrl,
content: card.content,
createAt: card.createAt
createAt: card.createAt,
writerPicture: card.writerPicture
}));
console.log("가공된", cardData);
setCard(cardData);
Expand Down Expand Up @@ -93,6 +94,7 @@ const HomeOther = () => {
photoUrl={cards.photoUrl}
content={cards.content}
createAt={cards.createAt}
profileUrl={cards.writerPicture}
/>
))}
</S.Container>
Expand Down
14 changes: 11 additions & 3 deletions src/newPages/homeOther/PostComponent.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,13 @@ const Avatar = styled.div`
width: 40px;
height: 40px;
border-radius: 50%;
background-color: #ddd;
margin-right: 10px;
overflow: hidden;
img {
width: 100%;
height: 100%;
object-fit: cover;
}
`;

const UserName = styled.span`
Expand Down Expand Up @@ -111,7 +116,8 @@ const PostComponent = ({
likeNumber,
photoUrl,
content,
createAt
createAt,
profileUrl
}: NewDiaryCardProps) => {
const navigate = useNavigate();
const handleClick = () => {
Expand All @@ -120,7 +126,9 @@ const PostComponent = ({
return (
<CardWrapper>
<Header>
<Avatar />
<Avatar>
<img src={profileUrl} />
</Avatar>
<UserName>{userName}</UserName>
<FriendButton>
<img src={Friend} />
Expand Down
1 change: 1 addition & 0 deletions src/pages/otherCollection/OtherCollection.types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,5 @@ export interface NewCard {
diaryId: number;
content: string;
createAt: string;
writerPicture: string;
}
7 changes: 6 additions & 1 deletion src/pages/writeDiary/WriteDiary.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,12 @@ const WriteDiary = () => {
</S.PaginationWrapper>
</>
) : null}
{isEmotionVisible ? <EmotionChoice /> : null}
{isEmotionVisible ? (
<>
<BotChatBubble text={"이야기 잘 들었어요!\n이때의 기분은 어떠셨나요?"} />
<EmotionChoice />
</>
) : null}
</S.ChatWrapper>

{isRecording && <div style={{ height: "500px" }} />}
Expand Down