Skip to content

Commit

Permalink
HOTFIX!: Pull Request 반영안된 부분 수정
Browse files Browse the repository at this point in the history
  • Loading branch information
KimKyuHoi committed Feb 16, 2024
1 parent 0bcd49d commit a28bc86
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 9 deletions.
15 changes: 8 additions & 7 deletions frontend/src/components/chat/ChatMessage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ interface ChatMessageListProps {

const ChatMessage = ({ messages, username }: ChatMessageListProps) => {
let currentFormattedDate = '';
console.log('메시지', username);

return (
<>
Expand Down Expand Up @@ -42,13 +43,6 @@ const ChatMessage = ({ messages, username }: ChatMessageListProps) => {
<MessageWrapper>
{/* 추후 코드 본인일 경우 상태관리 추가해야됨 */}
{item.sender === username ? (
<ChatReverseWrapper>
<ChatOwnBox>{item.content}</ChatOwnBox>
<ChatDateWrapper>
<FormattedTime>{isLastMessageForWriter && formattedTime}</FormattedTime>
</ChatDateWrapper>
</ChatReverseWrapper>
) : (
<>
<ChatSenderWrapper>
<ChatSender>{item.sender}</ChatSender>
Expand All @@ -60,6 +54,13 @@ const ChatMessage = ({ messages, username }: ChatMessageListProps) => {
</ChatDateWrapper>
</ChatWrapper>
</>
) : (
<ChatReverseWrapper>
<ChatOwnBox>{item.content}</ChatOwnBox>
<ChatDateWrapper>
<FormattedTime>{isLastMessageForWriter && formattedTime}</FormattedTime>
</ChatDateWrapper>
</ChatReverseWrapper>
)}
</MessageWrapper>
</MessageContainer>
Expand Down
5 changes: 3 additions & 2 deletions frontend/src/styles/Layout.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ export const Wrapper = styled.section`
min-width: 768px;
display: flex;
flex-direction: row;
background-color: var(--color-shark);
`;

export const MainWrapper = styled.div`
Expand All @@ -27,13 +28,13 @@ export const SideWrapper = styled.div`
margin: 0.5rem 0rem 0.5rem 0rem;
`;

export const FlexCenterWrapper =`
export const FlexCenterWrapper = `
display: flex;
justify-content: center;
align-items: center;
`;

export const ChattingRoomHeader =`
export const ChattingRoomHeader = `
background-color: var(--color-pumpkin);
color: var(--color-white);
border-radius: 5px 5px 0px 0px;
Expand Down

0 comments on commit a28bc86

Please sign in to comment.