@daeryun/dr_components 0.9.67 → 0.9.68
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.
|
@@ -8,10 +8,9 @@ import { useScrollShadow } from './_hooks/useScrollShadow';
|
|
|
8
8
|
import ShadowBox from './_ui/ShadowBox';
|
|
9
9
|
import CloseSvgIcon from '../../asset/images/daeryuntalk/close.svg';
|
|
10
10
|
import { formatTimestamp } from './_lib/utils';
|
|
11
|
-
import { useHoverScrollbar } from './_hooks/useHoverScrollbar';
|
|
12
11
|
const HistoryView = ({ onBackClick, onChatHistoryClick, onNewChatClick, isAuthenticated, historyLit, goGetHistoryList, isMobile, onClose, isHash, handleGoRequestPhone, handleGoHistoryPhoneAuth }) => {
|
|
13
12
|
const { containerRef, isScroll, isBottom, checkScroll } = useScrollShadow();
|
|
14
|
-
const { style: hoverStyle } = useHoverScrollbar(containerRef);
|
|
13
|
+
// const { style: hoverStyle } = useHoverScrollbar(containerRef);
|
|
15
14
|
useEffect(() => {
|
|
16
15
|
checkScroll();
|
|
17
16
|
}, [historyLit]);
|
|
@@ -39,7 +38,7 @@ const HistoryView = ({ onBackClick, onChatHistoryClick, onNewChatClick, isAuthen
|
|
|
39
38
|
{!isAuthenticated ? (<AuthForm goGetHistoryList={goGetHistoryList} handleGoRequestPhone={handleGoRequestPhone} handleGoHistoryPhoneAuth={handleGoHistoryPhoneAuth}/>) : (<>
|
|
40
39
|
{/* 스크롤 가능한 컨텐츠 영역 */}
|
|
41
40
|
<div className="relative w-full flex-1 overflow-hidden">
|
|
42
|
-
<div ref={containerRef} className={`${isMobile ? 'overflow-y-auto px-[20px] ' : ' pl-[20px] pr-[5px] '} h-full pb-[20px] pt-[24px] `}
|
|
41
|
+
<div ref={containerRef} className={`${isMobile ? 'overflow-y-auto px-[20px] ' : ' pl-[20px] pr-[5px] '} h-full pb-[20px] pt-[24px] `}>
|
|
43
42
|
{hasHistories ? (historyLit === null || historyLit === void 0 ? void 0 : historyLit.map((history, index) => (<div key={`${history.chat_inquiry_number}-${index}`} className={`cursor-pointer border-b border-drTalkGrayscale4 px-[12px] py-[18px] hover:bg-gray-50`} onClick={() => onChatHistoryClick(history.chat_inquiry_number)}>
|
|
44
43
|
<div className="flex items-center justify-between">
|
|
45
44
|
<div className={`flex flex-row items-center gap-[10px]`}>
|
|
@@ -39,7 +39,7 @@ const HistoryView: React.FC<HistoryViewProps> = ({
|
|
|
39
39
|
handleGoHistoryPhoneAuth
|
|
40
40
|
}) => {
|
|
41
41
|
const { containerRef, isScroll, isBottom, checkScroll } = useScrollShadow<HTMLDivElement>();
|
|
42
|
-
const { style: hoverStyle } = useHoverScrollbar(containerRef);
|
|
42
|
+
// const { style: hoverStyle } = useHoverScrollbar(containerRef);
|
|
43
43
|
|
|
44
44
|
useEffect(() => {
|
|
45
45
|
checkScroll();
|
|
@@ -90,7 +90,7 @@ const HistoryView: React.FC<HistoryViewProps> = ({
|
|
|
90
90
|
<div
|
|
91
91
|
ref={containerRef}
|
|
92
92
|
className={`${isMobile ? 'overflow-y-auto px-[20px] ' : ' pl-[20px] pr-[5px] '} h-full pb-[20px] pt-[24px] `}
|
|
93
|
-
style={{ ...(!isMobile ? hoverStyle : {}) }}
|
|
93
|
+
// style={{ ...(!isMobile ? hoverStyle : {}) }}
|
|
94
94
|
>
|
|
95
95
|
{hasHistories ? (
|
|
96
96
|
historyLit?.map((history, index) => (
|
|
@@ -10,7 +10,6 @@ import DaeryuntalkIntro from '../../asset/images/daeryuntalk/daeryuntalk_home_bg
|
|
|
10
10
|
import CloseSvgIcon from '../../asset/images/daeryuntalk/close.svg';
|
|
11
11
|
import { useScrollShadow } from './_hooks/useScrollShadow';
|
|
12
12
|
import Button3 from './_ui/buttons/Button3';
|
|
13
|
-
import { useHoverScrollbar } from './_hooks/useHoverScrollbar';
|
|
14
13
|
import { useWindowSize } from './_hooks/useWindowSize';
|
|
15
14
|
const HomeView = ({ inquiryMainData, isLoading, handleStartChat, isMobile, onClose, isHash }) => {
|
|
16
15
|
const { containerRef, isScroll, isBottom, checkScroll, isScrolling } = useScrollShadow();
|
|
@@ -18,7 +17,7 @@ const HomeView = ({ inquiryMainData, isLoading, handleStartChat, isMobile, onClo
|
|
|
18
17
|
const [contentHeight, setContentHeight] = useState(210);
|
|
19
18
|
const currentHeightRef = useRef(210);
|
|
20
19
|
const prevWrapperHeightRef = useRef(null);
|
|
21
|
-
const { style: hoverStyle } = useHoverScrollbar(containerRef);
|
|
20
|
+
// const { style: hoverStyle } = useHoverScrollbar(containerRef);
|
|
22
21
|
const browserSize = useWindowSize();
|
|
23
22
|
useEffect(() => {
|
|
24
23
|
const updateContentHeight = () => {
|
|
@@ -136,7 +135,10 @@ const HomeView = ({ inquiryMainData, isLoading, handleStartChat, isMobile, onClo
|
|
|
136
135
|
<section className={` flex h-full flex-col rounded-[12px] bg-white px-[16px] py-[24px] sm:h-fit ${isMobile ? 'w-full' : ' justify-between xs:justify-start '}`} style={{ boxShadow: '0px 4px 10px 0px #00000026' }}>
|
|
137
136
|
{/* 해당 컴포넌트의 최상위 부모와 브라우저 상단과 닿았을 때 우선적으로 해당 부분의 높이가 먼저 줄어들게 하고 싶다*/}
|
|
138
137
|
<div className="relative">
|
|
139
|
-
<div ref={containerRef} className={`flex min-h-[80px] flex-col ${isMobile ? 'overflow-y-auto ' : ''} overlay-scrollbar`} style={
|
|
138
|
+
<div ref={containerRef} className={`flex min-h-[80px] flex-col ${isMobile ? 'overflow-y-auto ' : ''} overlay-scrollbar`} style={{
|
|
139
|
+
maxHeight: `${contentHeight}px`
|
|
140
|
+
// ...(!isMobile ? hoverStyle : {})
|
|
141
|
+
}}>
|
|
140
142
|
<div className="flex items-center gap-[10px]">
|
|
141
143
|
{(inquiryMainData === null || inquiryMainData === void 0 ? void 0 : inquiryMainData.channel_logo_image_url) ? (<Image src={inquiryMainData.channel_logo_image_url} alt="로고" width={32} height={32}/>) : (<DaeryunLogoIcon width={24} height={24} className="mr-2"/>)}
|
|
142
144
|
<h2 className="dr_talk_title_small text-drTalkBlack">
|
|
@@ -32,7 +32,7 @@ const HomeView = ({ inquiryMainData, isLoading, handleStartChat, isMobile, onClo
|
|
|
32
32
|
const [contentHeight, setContentHeight] = useState<number>(210);
|
|
33
33
|
const currentHeightRef = useRef(210);
|
|
34
34
|
const prevWrapperHeightRef = useRef<number | null>(null);
|
|
35
|
-
const { style: hoverStyle } = useHoverScrollbar(containerRef);
|
|
35
|
+
// const { style: hoverStyle } = useHoverScrollbar(containerRef);
|
|
36
36
|
const browserSize = useWindowSize();
|
|
37
37
|
|
|
38
38
|
useEffect(() => {
|
|
@@ -185,8 +185,8 @@ const HomeView = ({ inquiryMainData, isLoading, handleStartChat, isMobile, onClo
|
|
|
185
185
|
ref={containerRef}
|
|
186
186
|
className={`flex min-h-[80px] flex-col ${isMobile ? 'overflow-y-auto ' : ''} overlay-scrollbar`}
|
|
187
187
|
style={{
|
|
188
|
-
maxHeight: `${contentHeight}px
|
|
189
|
-
...(!isMobile ? hoverStyle : {})
|
|
188
|
+
maxHeight: `${contentHeight}px`
|
|
189
|
+
// ...(!isMobile ? hoverStyle : {})
|
|
190
190
|
}}
|
|
191
191
|
>
|
|
192
192
|
<div className="flex items-center gap-[10px]">
|