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

[Chat refactor] 사용하지 않는 파일을 제거합니다. #2999

Merged
merged 5 commits into from
Nov 17, 2023
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
16 changes: 14 additions & 2 deletions packages/chat/src/bubble-container/bubble-container.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
import { PropsWithChildren } from 'react'
import { Container } from '@titicaca/core-elements'

import { DEFAULT_MESSAGE_ID_PREFIX } from '../chat/constants'

import { BubbleInfo } from './bubble-info'
import {
DeleteButton,
Expand All @@ -18,6 +20,7 @@ const CHAT_CONTAINER_STYLES = {
} as const

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

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

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

function ReceivedBubbleContainer({
id,
profile,
unreadCount,
createdAt,
showInfo,
children,
}: ReceivedBubbleContainerProp) {
return (
<Container css={{ ...CHAT_CONTAINER_STYLES }}>
<Container
id={`${DEFAULT_MESSAGE_ID_PREFIX}-${id}`}
css={{ ...CHAT_CONTAINER_STYLES }}
>
<ProfileImage src={profile?.thumbnailUrl} />
<Container css={{ marginLeft: 50 }}>
<ProfileName size="mini" alpha={0.8} margin={{ bottom: 5 }}>
Expand Down
2 changes: 1 addition & 1 deletion packages/chat/src/bubble-container/index.ts
Original file line number Diff line number Diff line change
@@ -1 +1 @@
export { default } from './bubble-container'
export { default as BubbleContainer } from './bubble-container'
1 change: 1 addition & 0 deletions packages/chat/src/bubble/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,4 @@ export { TextBubble } from './text'
export { RichBubble } from './rich'
export { ProductBubble } from './product'
export { Badge, ProductName, ProductImage, ProductHr } from './elements'
export { default as BubbleUI } from './bubble-ui'
77 changes: 0 additions & 77 deletions packages/chat/src/chat/chat-container.stories.tsx

This file was deleted.

79 changes: 0 additions & 79 deletions packages/chat/src/chat/chat-container.tsx

This file was deleted.

40 changes: 0 additions & 40 deletions packages/chat/src/chat/chat-context.ts

This file was deleted.

Loading