@daeryun/dr_components 1.0.39 → 1.0.41
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.
- package/dist/cjs/tsconfig-cjs.tsbuildinfo +1 -1
- package/dist/components/Daeryuntalk/ChatButton.jsx +10 -25
- package/dist/components/Daeryuntalk/ChatButton.tsx +4 -17
- package/dist/components/page/StrengthNew/components/common/ViewMoreSection.d.ts +1 -1
- package/dist/components/page/StrengthNew/components/common/ViewMoreSection.jsx +20 -17
- package/dist/components/page/StrengthNew/components/common/ViewMoreSection.tsx +51 -25
- package/dist/styles/globals.css +0 -8
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +1 -1
|
@@ -2,10 +2,11 @@ import Link from 'next/link';
|
|
|
2
2
|
import React from 'react';
|
|
3
3
|
import Image from 'next/image';
|
|
4
4
|
import { usePathname, useRouter } from 'next/navigation';
|
|
5
|
-
import { IViewMoreListTypes } from '../../../../common
|
|
5
|
+
import { IViewMoreListTypes } from '../../../../common';
|
|
6
6
|
import { IInitialDataTypes } from '../../../../common';
|
|
7
7
|
import Wrapper from '../../../../Layout/Wrapper';
|
|
8
8
|
import { replaceInitialData } from '../../../../../lib';
|
|
9
|
+
import useBrowser from '../../../../hook/useBrowser';
|
|
9
10
|
|
|
10
11
|
const ViewMoreSection = ({
|
|
11
12
|
view_more_section_title,
|
|
@@ -18,6 +19,8 @@ const ViewMoreSection = ({
|
|
|
18
19
|
}) => {
|
|
19
20
|
const pathname = usePathname();
|
|
20
21
|
const isMain = pathname === '/strength';
|
|
22
|
+
const { width } = useBrowser(false); // 디바운스 적용
|
|
23
|
+
const isPC = width >= 1280;
|
|
21
24
|
|
|
22
25
|
return (
|
|
23
26
|
<section
|
|
@@ -40,16 +43,19 @@ const ViewMoreSection = ({
|
|
|
40
43
|
>
|
|
41
44
|
{view_more_section_title}
|
|
42
45
|
</h2>
|
|
43
|
-
|
|
44
|
-
{
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
46
|
+
{isPC ? (
|
|
47
|
+
<div className={(isMain ? 'grid-cols-4' : 'grid-cols-3 ') + ' mt-10 grid gap-5'}>
|
|
48
|
+
{view_more_list.map((item, index) => (
|
|
49
|
+
<ViewMorePCItem key={index} item={item} index={index} initialData={initialData} />
|
|
50
|
+
))}
|
|
51
|
+
</div>
|
|
52
|
+
) : (
|
|
53
|
+
<div className={'mt-[20px] grid max-xl:grid-cols-1 max-[700px]:mt-0'}>
|
|
54
|
+
{view_more_list.map((item, index) => (
|
|
55
|
+
<ViewMoreTabItem key={index} item={item} index={index} initialData={initialData} />
|
|
56
|
+
))}
|
|
57
|
+
</div>
|
|
58
|
+
)}
|
|
53
59
|
</Wrapper>
|
|
54
60
|
</section>
|
|
55
61
|
);
|
|
@@ -142,14 +148,25 @@ const ViewMorePCItem = ({
|
|
|
142
148
|
/>
|
|
143
149
|
</div>
|
|
144
150
|
</span>
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
151
|
+
{hidden ? (
|
|
152
|
+
<p
|
|
153
|
+
className={
|
|
154
|
+
'mt-10 text-[32px] font-[800] leading-none transition-colors duration-500 ' +
|
|
155
|
+
'max-3xl:mt-8 max-3xl:text-[30px]'
|
|
156
|
+
}
|
|
157
|
+
>
|
|
158
|
+
{item.title}
|
|
159
|
+
</p>
|
|
160
|
+
) : (
|
|
161
|
+
<h3
|
|
162
|
+
className={
|
|
163
|
+
'mt-10 text-[32px] font-[800] leading-none transition-colors duration-500 ' +
|
|
164
|
+
'max-3xl:mt-8 max-3xl:text-[30px]'
|
|
165
|
+
}
|
|
166
|
+
>
|
|
167
|
+
{item.title}
|
|
168
|
+
</h3>
|
|
169
|
+
)}
|
|
153
170
|
<p
|
|
154
171
|
className={
|
|
155
172
|
'mt-6 line-clamp-2 min-h-[62px] text-[24px] font-[600] leading-[1.3] max-3xl:mt-4 max-3xl:text-[22px]'
|
|
@@ -267,12 +284,21 @@ const ViewMoreTabItem = ({
|
|
|
267
284
|
</div>
|
|
268
285
|
<div className={'flex flex-col gap-4 max-[700px]:gap-[10px]'}>
|
|
269
286
|
<div className={'flex justify-between'}>
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
287
|
+
{hidden ? (
|
|
288
|
+
<p
|
|
289
|
+
className={'text-[24px] font-[800] leading-none max-md:text-[22px] max-[700px]:text-[20px]'}
|
|
290
|
+
style={{ color: item.color }}
|
|
291
|
+
>
|
|
292
|
+
{item.title}
|
|
293
|
+
</p>
|
|
294
|
+
) : (
|
|
295
|
+
<h3
|
|
296
|
+
className={'text-[24px] font-[800] leading-none max-md:text-[22px] max-[700px]:text-[20px]'}
|
|
297
|
+
style={{ color: item.color }}
|
|
298
|
+
>
|
|
299
|
+
{item.title}
|
|
300
|
+
</h3>
|
|
301
|
+
)}
|
|
276
302
|
<div className={'mt-auto flex justify-end'}>
|
|
277
303
|
<span className={'flex items-center gap-[10px] text-[16px] leading-[1] '}>
|
|
278
304
|
{item.view_more_text}
|
package/dist/styles/globals.css
CHANGED
|
@@ -19034,10 +19034,6 @@ body {
|
|
|
19034
19034
|
display: none;
|
|
19035
19035
|
}
|
|
19036
19036
|
|
|
19037
|
-
.lg\:h-\[100px\] {
|
|
19038
|
-
height: 100px;
|
|
19039
|
-
}
|
|
19040
|
-
|
|
19041
19037
|
.lg\:h-\[12px\] {
|
|
19042
19038
|
height: 12px;
|
|
19043
19039
|
}
|
|
@@ -19174,10 +19170,6 @@ body {
|
|
|
19174
19170
|
width: 100%;
|
|
19175
19171
|
}
|
|
19176
19172
|
|
|
19177
|
-
.lg\:w-\[100px\] {
|
|
19178
|
-
width: 100px;
|
|
19179
|
-
}
|
|
19180
|
-
|
|
19181
19173
|
.lg\:w-\[10px\] {
|
|
19182
19174
|
width: 10px;
|
|
19183
19175
|
}
|