Skip to content

Commit

Permalink
bubbleContainer에 id값 추가
Browse files Browse the repository at this point in the history
  • Loading branch information
dongoc committed Nov 16, 2023
1 parent dd68f3b commit f5a8d2c
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions packages/chat/src/bubble-container/bubble-container.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ const CHAT_CONTAINER_STYLES = {
} as const

type SentBubbleContainerProp = PropsWithChildren<{
id: string
/** 메시지 생성 시간 */
createdAt?: string // Date?
/** 전송 실패한 메시지 재전송 시도 함수 */
Expand All @@ -31,6 +32,7 @@ type SentBubbleContainerProp = PropsWithChildren<{
}>

function SentBubbleContainer({
id,
createdAt,
onRetry,
onRetryCancel,
Expand All @@ -39,7 +41,7 @@ function SentBubbleContainer({
children,
}: SentBubbleContainerProp) {
return (
<Container css={{ textAlign: 'right', ...CHAT_CONTAINER_STYLES }}>
<Container id={id} css={{ textAlign: 'right', ...CHAT_CONTAINER_STYLES }}>
{!createdAt ? (
<SendingFailureHandlerContainer>
<RetryButton onClick={onRetry} />
Expand All @@ -58,6 +60,7 @@ function SentBubbleContainer({
}

type ReceivedBubbleContainerProp = PropsWithChildren<{
id: string
/** 메시지 생성 시간 */
createdAt?: string // Date?
/** 메시지 발신인 정보 */
Expand All @@ -74,14 +77,15 @@ type ReceivedBubbleContainerProp = PropsWithChildren<{
}>

function ReceivedBubbleContainer({
id,
profile,
unreadCount,
createdAt,
showInfo,
children,
}: ReceivedBubbleContainerProp) {
return (
<Container css={{ ...CHAT_CONTAINER_STYLES }}>
<Container id={id} css={{ ...CHAT_CONTAINER_STYLES }}>
<ProfileImage src={profile?.thumbnailUrl} />
<Container css={{ marginLeft: 50 }}>
<ProfileName size="mini" alpha={0.8} margin={{ bottom: 5 }}>
Expand Down

0 comments on commit f5a8d2c

Please sign in to comment.