@daeryun/dr_components 0.8.89 → 0.8.91

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -46,11 +46,14 @@ const ChatHomeView = ({ hashValue, onClose, isMobile, isHash }) => {
46
46
  else {
47
47
  }
48
48
  }, [hashValue, isConnected, inquiryMainData]);
49
- // 히스토리 진입 시
49
+ // viewState 진입
50
50
  useEffect(() => {
51
51
  if (isAuthenticated && viewState === 'history') {
52
52
  goGetHistoryList({});
53
53
  }
54
+ if (isAuthenticated && viewState === 'conversation') {
55
+ goGetHistoryList({});
56
+ }
54
57
  }, [viewState, isAuthenticated]);
55
58
  useEffect(() => {
56
59
  if (inquiryMainData !== null) {
@@ -98,11 +98,14 @@ const ChatHomeView: React.FC<ChatHomeViewProps> = ({ hashValue, onClose, isMobil
98
98
  }
99
99
  }, [hashValue, isConnected, inquiryMainData]);
100
100
 
101
- // 히스토리 진입 시
101
+ // viewState 진입
102
102
  useEffect(() => {
103
103
  if (isAuthenticated && viewState === 'history') {
104
104
  goGetHistoryList({});
105
105
  }
106
+ if (isAuthenticated && viewState === 'conversation') {
107
+ goGetHistoryList({});
108
+ }
106
109
  }, [viewState, isAuthenticated]);
107
110
 
108
111
  useEffect(() => {
@@ -23,7 +23,7 @@ const NavigationFooter = ({ activeView, onHomeClick, onHistoryClick, historyList
23
23
  (() => {
24
24
  const unreadCount = historyList.reduce((sum, item) => sum + (item.unread_message_count || 0), 0);
25
25
  const isHundredOver = unreadCount > 99;
26
- return unreadCount > 0 ? (<span className={`${isHundredOver ? ' -right-[20px] -top-[5px] h-[18px] w-[31px] rounded-[15.5px] ' : '-right-[8px] -top-[5px] h-[18px] w-[18px] rounded-full pr-[1px]'}dr_talk_subtitle_small2 absolute flex items-center justify-center bg-drTalkCrimson text-drTalkWhite`}>
26
+ return unreadCount > 0 ? (<span className={`${isHundredOver ? ' -right-[20px] -top-[5px] h-[18px] w-[31px] rounded-[15.5px] ' : '-right-[8px] -top-[5px] h-[18px] w-[18px] rounded-full pr-[1px]'} dr_talk_subtitle_small2 absolute flex items-center justify-center bg-drTalkCrimson text-drTalkWhite`}>
27
27
  {isHundredOver ? '99+' : unreadCount}
28
28
  </span>) : null;
29
29
  })()}
@@ -65,7 +65,7 @@ const NavigationFooter: React.FC<NavigationFooterProps> = ({
65
65
 
66
66
  return unreadCount > 0 ? (
67
67
  <span
68
- className={`${isHundredOver ? ' -right-[20px] -top-[5px] h-[18px] w-[31px] rounded-[15.5px] ' : '-right-[8px] -top-[5px] h-[18px] w-[18px] rounded-full pr-[1px]'}dr_talk_subtitle_small2 absolute flex items-center justify-center bg-drTalkCrimson text-drTalkWhite`}
68
+ className={`${isHundredOver ? ' -right-[20px] -top-[5px] h-[18px] w-[31px] rounded-[15.5px] ' : '-right-[8px] -top-[5px] h-[18px] w-[18px] rounded-full pr-[1px]'} dr_talk_subtitle_small2 absolute flex items-center justify-center bg-drTalkCrimson text-drTalkWhite`}
69
69
  >
70
70
  {isHundredOver ? '99+' : unreadCount}
71
71
  </span>
@@ -246,8 +246,10 @@ export const useSocketEventHandler = ({ setIsConnected, setIsLoading, setMessage
246
246
  }
247
247
  else {
248
248
  toast.error('인증에 실패했습니다.');
249
- onClose();
250
- window.location.href = '/';
249
+ setTimeout(() => {
250
+ onClose();
251
+ window.location.href = '/';
252
+ }, 500);
251
253
  }
252
254
  }
253
255
  if (!(((_d = inquiryData === null || inquiryData === void 0 ? void 0 : inquiryData.result_info) === null || _d === void 0 ? void 0 : _d.result_cd) === 'OK' || ((_e = inquiryData === null || inquiryData === void 0 ? void 0 : inquiryData.result_info) === null || _e === void 0 ? void 0 : _e.result_type_cd) === 'OK')) {
@@ -338,8 +338,10 @@ export const useSocketEventHandler = ({
338
338
  console.log('해쉬 인증 완료');
339
339
  } else {
340
340
  toast.error('인증에 실패했습니다.');
341
- onClose();
342
- window.location.href = '/';
341
+ setTimeout(() => {
342
+ onClose();
343
+ window.location.href = '/';
344
+ }, 500);
343
345
  }
344
346
  }
345
347