Skip to content

Commit

Permalink
[Chat] refactor: MINIMUM_INTERSECTING_TIME 상수명 변경
Browse files Browse the repository at this point in the history
  • Loading branch information
dia-triple committed Aug 29, 2023
1 parent 7738cb1 commit b41e078
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/chat/src/chat/chat.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ import { useChat } from './chat-context'
import { useChatMessage } from './use-chat-message'
import { getChatListHeight, useScrollContext } from './scroll-context'

const MINIMUM_INTERSECTING_TIME = 3000
const MINIMUM_INITIAL_INTERSECTING_TIME = 3000
export const CHAT_CONTAINER_ID = 'chat-inner-container'

export interface ChatProps {
Expand Down Expand Up @@ -241,7 +241,7 @@ export const Chat = ({
(target as HTMLElement).dataset.viewStartedAt,
)
if (
time - viewStartedAt >= MINIMUM_INTERSECTING_TIME &&
time - viewStartedAt >= MINIMUM_INITIAL_INTERSECTING_TIME &&
hasPrevMessage
) {
const pastMessages = await fetchPastMessages()
Expand Down

0 comments on commit b41e078

Please sign in to comment.