@daeryun/dr_components 1.0.9 → 1.0.10

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.
Files changed (45) hide show
  1. package/dist/components/common/types/strength_new/index.d.ts +65 -0
  2. package/dist/components/common/types/strength_new/index.js +1 -0
  3. package/dist/components/common/types/strength_new/index.ts +68 -0
  4. package/dist/components/page/LawInfoNew/LawInfoNew.jsx +21 -20
  5. package/dist/components/page/LawInfoNew/LawInfoNew.tsx +37 -24
  6. package/dist/components/page/LawInfoNew/LawInfoNewTypes.d.ts +1 -1
  7. package/dist/components/page/LawInfoNew/LawInfoNewTypes.ts +1 -1
  8. package/dist/components/page/StrengthNew/StrengthNew.d.ts +8 -0
  9. package/dist/components/page/StrengthNew/StrengthNew.jsx +11 -0
  10. package/dist/components/page/StrengthNew/StrengthNew.tsx +28 -0
  11. package/dist/components/page/StrengthNew/StrengthPeople.d.ts +8 -0
  12. package/dist/components/page/StrengthNew/StrengthPeople.jsx +13 -0
  13. package/dist/components/page/StrengthNew/StrengthPeople.tsx +34 -0
  14. package/dist/components/page/StrengthNew/StrengthSystem.d.ts +8 -0
  15. package/dist/components/page/StrengthNew/StrengthSystem.jsx +13 -0
  16. package/dist/components/page/StrengthNew/StrengthSystem.tsx +35 -0
  17. package/dist/components/page/StrengthNew/components/common/BannerSection.d.ts +13 -0
  18. package/dist/components/page/StrengthNew/components/common/BannerSection.jsx +111 -0
  19. package/dist/components/page/StrengthNew/components/common/BannerSection.tsx +231 -0
  20. package/dist/components/page/StrengthNew/components/common/LawyerSection.d.ts +12 -0
  21. package/dist/components/page/StrengthNew/components/common/LawyerSection.jsx +82 -0
  22. package/dist/components/page/StrengthNew/components/common/LawyerSection.tsx +193 -0
  23. package/dist/components/page/StrengthNew/components/common/ViewMoreSection.d.ts +9 -0
  24. package/dist/components/page/StrengthNew/components/common/ViewMoreSection.jsx +141 -0
  25. package/dist/components/page/StrengthNew/components/common/ViewMoreSection.tsx +297 -0
  26. package/dist/components/page/StrengthNew/components/main/IntroSection.d.ts +6 -0
  27. package/dist/components/page/StrengthNew/components/main/IntroSection.jsx +66 -0
  28. package/dist/components/page/StrengthNew/components/main/IntroSection.tsx +115 -0
  29. package/dist/components/page/StrengthNew/components/people/PeopleSection.d.ts +10 -0
  30. package/dist/components/page/StrengthNew/components/people/PeopleSection.jsx +166 -0
  31. package/dist/components/page/StrengthNew/components/people/PeopleSection.tsx +324 -0
  32. package/dist/components/page/StrengthNew/components/system/SystemSection.d.ts +6 -0
  33. package/dist/components/page/StrengthNew/components/system/SystemSection.jsx +270 -0
  34. package/dist/components/page/StrengthNew/components/system/SystemSection.tsx +495 -0
  35. package/dist/components/page/SuccessNew/SuccessNewType.d.ts +1 -0
  36. package/dist/components/page/SuccessNew/SuccessNewType.ts +1 -0
  37. package/dist/components/page/SuccessNew/components/H2Contents.d.ts +2 -1
  38. package/dist/components/page/SuccessNew/components/H2Contents.jsx +44 -6
  39. package/dist/components/page/SuccessNew/components/H2Contents.tsx +64 -12
  40. package/dist/components/page/SuccessNew/components/H3Contents.d.ts +2 -1
  41. package/dist/components/page/SuccessNew/components/H3Contents.jsx +43 -5
  42. package/dist/components/page/SuccessNew/components/H3Contents.tsx +57 -9
  43. package/dist/styles/globals.css +1091 -0
  44. package/dist/tsconfig.tsbuildinfo +1 -1
  45. package/package.json +1 -1
@@ -0,0 +1,495 @@
1
+ import Image from 'next/image';
2
+ import React, { useEffect, useState } from 'react';
3
+ import { ISystemPageDataTypes } from '../../../../common/types/strength_new';
4
+ import useBrowser from '../../../../hook/useBrowser';
5
+
6
+ const SystemSection = ({ data }: { data: ISystemPageDataTypes }) => {
7
+ return (
8
+ <section className={'w-full pt-[100px] tracking-[-0.04em] max-lg:pt-10'}>
9
+ <RightTextItem //@ts-ignore
10
+ item={data.system_list[0]}
11
+ index={0}
12
+ consult_step={{
13
+ consult_step_1_title: data.consult_step_1_title,
14
+ consult_step_1_desc: data.consult_step_1_desc,
15
+ consult_step_2_title: data.consult_step_2_title,
16
+ consult_step_2_desc: data.consult_step_2_desc
17
+ }}
18
+ />
19
+ {/*@ts-ignore*/}
20
+ <LeftTextItem index={1} item={data.system_list[1]} />
21
+ </section>
22
+ );
23
+ };
24
+ export default SystemSection;
25
+
26
+ const RightTextItem = ({
27
+ item,
28
+ consult_step,
29
+ index
30
+ }: {
31
+ item: {
32
+ title: string;
33
+ desc: string;
34
+ list?: { title: string; list: string[] }[];
35
+ };
36
+ index: number;
37
+ consult_step: {
38
+ consult_step_1_title: string;
39
+ consult_step_1_desc: string;
40
+ consult_step_2_title: string;
41
+ consult_step_2_desc: string;
42
+ };
43
+ }) => {
44
+ const imagePath: string = process.env.NEXT_PUBLIC_S3_URL + '';
45
+ const { width } = useBrowser(true);
46
+ const [padding, setPadding] = useState<number>(0);
47
+
48
+ const ConsultBox = ({ title, desc }: { title: string; desc: string }) => {
49
+ return (
50
+ <span
51
+ className={
52
+ 'flex h-[102px] w-full max-w-[260px] flex-col items-center justify-center break-keep rounded-[10px] bg-[#5674AE0D] px-3 text-center text-[20px] leading-[1.4] ' +
53
+ 'max-3xl:text-[18px] ' +
54
+ 'max-xl:h-[62px] max-xl:max-w-[173px] max-xl:text-[14px] ' +
55
+ 'max-md:h-[86px] max-md:max-w-[unset] max-md:whitespace-pre-wrap '
56
+ }
57
+ >
58
+ <span className={'text-[24px] font-[700] max-5xl:text-[22px] max-3xl:text-[20px] max-xl:text-[16px]'}>
59
+ {title}{' '}
60
+ </span>
61
+ {desc}
62
+ </span>
63
+ );
64
+ };
65
+
66
+ useEffect(() => {
67
+ if (width != 0) {
68
+ if (width > 2119) {
69
+ setPadding((width - 1920 + 80) / 2);
70
+ } else if (width < 2120 && width > 1920) {
71
+ setPadding((width - 1920 + 280) / 2);
72
+ }
73
+ }
74
+ }, [width]);
75
+
76
+ return (
77
+ <div
78
+ className={
79
+ 'w-full pl-[calc((100%-1920px+80px)/2)] ' +
80
+ 'max-[2120px]:pl-[calc((100%-1920px+280px)/2)] ' +
81
+ 'max-full:pl-[140px] ' +
82
+ 'max-3xl:pl-20 ' +
83
+ 'max-lg:pl-[60px] ' +
84
+ 'max-sm:pl-5 ' +
85
+ (index != 0 ? 'mt-[-100px] max-xl:mt-[-50px] max-sm:mt-[-20px]' : '')
86
+ }
87
+ >
88
+ <div className={'relative h-full w-full '}>
89
+ {/*원*/}
90
+ <div
91
+ className={
92
+ 'absolute left-0 top-0 h-[400px] w-[400px] overflow-hidden rounded-full border border-solid border-[#5674AE] max-xl:h-[200px] max-xl:w-[200px] max-sm:h-[180px] max-sm:w-[180px]'
93
+ }
94
+ >
95
+ {/*이미지*/}
96
+ <span
97
+ className={
98
+ 'absolute bottom-0 right-0 block h-[299px] w-[279px] overflow-hidden max-xl:h-[149px] max-xl:w-[139px] max-xl:rounded-tl-[100px] max-sm:h-[160px] max-sm:w-[160px]'
99
+ }
100
+ >
101
+ <Image
102
+ src={imagePath + `/strength_new/system_${index + 1}.webp`}
103
+ alt={'강점'}
104
+ fill
105
+ sizes="(max-width: 640px) 160px, (max-width: 1280px) 139px, 279px"
106
+ className={'object-contain object-right max-sm:hidden'}
107
+ quality={100}
108
+ />
109
+ <Image
110
+ src={imagePath + `/strength_new/system_mo_${index + 1}.webp`}
111
+ alt={'강점'}
112
+ fill
113
+ sizes="(max-width: 640px) 160px, (max-width: 1280px) 139px, 279px"
114
+ className={'object-contain object-right sm:hidden'}
115
+ quality={100}
116
+ />
117
+ </span>
118
+ </div>
119
+
120
+ {/*내용 박스 > 원 위에*/}
121
+ <div
122
+ className={
123
+ 'relative w-full pl-[120px] pt-[100px] ' +
124
+ 'max-xl:pl-[60px] max-xl:pt-[50px] ' +
125
+ 'max-sm:pl-5 max-sm:pt-5'
126
+ }
127
+ >
128
+ {/*보더*/}
129
+ <div
130
+ className={
131
+ 'relative w-full rounded-tl-[100px] border-l border-t border-solid border-l-[#5674AE] border-t-[#5674AE] pb-[100px] pl-[280px] ' +
132
+ 'max-xl:pb-[50px] max-xl:pl-[140px] ' +
133
+ 'max-md:pl-10 max-md:pt-[140px] ' +
134
+ 'max-sm:pb-5 max-sm:pl-5 max-sm:pt-[160px] '
135
+ }
136
+ >
137
+ {/*글자 내용*/}
138
+ <div
139
+ style={{ paddingRight: padding + 120 }}
140
+ className={
141
+ 'relative flex min-h-[360px] w-full flex-col gap-10 pb-[65px] pl-[120px] pt-[60px] ' +
142
+ 'max-3xl:gap-7 max-3xl:!pr-[200px] max-3xl:pl-20 ' +
143
+ 'max-xl:min-h-[228px] max-xl:gap-5 max-xl:p-10 max-xl:!pr-[140px] ' +
144
+ 'max-lg:!pr-[120px] ' +
145
+ // 'max-md:text-right ' +
146
+ 'max-sm:p-5 max-sm:!pr-10 max-sm:pb-10 '
147
+ }
148
+ >
149
+ <h2
150
+ className={
151
+ 'whitespace-pre-wrap text-[36px] font-[800] leading-[1.3] ' +
152
+ 'max-5xl:text-[34px] ' +
153
+ 'max-3xl:text-[32px] ' +
154
+ 'max-xl:text-[24px] ' +
155
+ 'max-md:text-right ' +
156
+ 'max-sm:text-[20px]'
157
+ }
158
+ >
159
+ {item.title}
160
+ </h2>
161
+ <p
162
+ className={
163
+ 'relative z-10 whitespace-pre-wrap text-[24px] font-[400] leading-[1.4] ' +
164
+ 'max-5xl:text-[22px] ' +
165
+ 'max-3xl:text-[20px] ' +
166
+ 'max-xl:text-[16px]'
167
+ }
168
+ >
169
+ {item.desc}
170
+ <p
171
+ className={
172
+ 'absolute right-0 top-[-160px] z-0 text-[200px] font-[900] leading-none text-[#E7E7E7] opacity-25 ' +
173
+ 'max-3xl:top-[-130px] max-3xl:text-[150px] ' +
174
+ 'max-xl:top-[-95px] max-xl:text-[120px] ' +
175
+ 'max-md2:text-[100px] ' +
176
+ 'max-md:top-[-190px] ' +
177
+ 'max-sm:top-[-176px] max-sm:text-[80px]'
178
+ }
179
+ >
180
+ 0{index + 1}
181
+ </p>
182
+ </p>
183
+
184
+ <div
185
+ className={
186
+ 'flex flex-col gap-[60px] border-t border-solid border-[#F6F6F6] pt-10 max-xl:pt-5 max-lg:gap-[30px]'
187
+ }
188
+ >
189
+ {item.list?.map((li, index) => {
190
+ return (
191
+ <div
192
+ className={
193
+ 'flex gap-10 max-5xl:gap-8 max-3xl:gap-7 max-xl:gap-5 max-md:flex-col max-md:gap-[10px]'
194
+ }
195
+ key={index}
196
+ >
197
+ <h3
198
+ className={
199
+ 'flex h-fit w-[200px] shrink-0 items-center gap-[10px] text-[24px] font-bold leading-none text-[#5674AE] ' +
200
+ 'max-5xl:w-[170px] max-5xl:text-[22px] ' +
201
+ 'max-3xl:w-[160px] max-3xl:text-[20px] ' +
202
+ 'max-xl:w-[120px] max-xl:text-[16px]'
203
+ }
204
+ >
205
+ <span
206
+ className={
207
+ 'block h-6 w-6 rounded-full bg-[#5674AE] ' +
208
+ 'max-5xl:h-[22px] max-5xl:w-[22px] ' +
209
+ 'max-3xl:h-5 max-3xl:w-5 ' +
210
+ 'max-xl:h-4 max-xl:w-4'
211
+ }
212
+ />
213
+ {li.title}
214
+ </h3>
215
+ {index === 0 ? (
216
+ <div>
217
+ <p
218
+ className={
219
+ 'mb-5 text-[24px] font-[600] leading-[1.4] ' +
220
+ 'max-5xl:text-[22px] ' +
221
+ 'max-3xl:text-[20px] ' +
222
+ 'max-xl:text-[16px] '
223
+ }
224
+ >
225
+ {li.list[0]}
226
+ </p>
227
+ <div className={'mb-5 flex items-center gap-5 max-lg:gap-[10px]'}>
228
+ <ConsultBox
229
+ title={consult_step.consult_step_1_title}
230
+ desc={consult_step.consult_step_1_desc}
231
+ />
232
+
233
+ <span className={'shrink-0 text-[24px]'}>=</span>
234
+ <ConsultBox
235
+ title={consult_step.consult_step_2_title}
236
+ desc={consult_step.consult_step_2_desc}
237
+ />
238
+ </div>
239
+ <ul className="text-[20px] leading-[1.8] max-3xl:text-[18px] max-xl:text-[16px]">
240
+ {li.list.slice(1, -1).map((l, l_index) => {
241
+ return <li key={l_index}>•&nbsp;&nbsp;{l}</li>;
242
+ })}
243
+ </ul>
244
+ <p
245
+ className={
246
+ 'mt-[10px] text-[20px] leading-[1.8] max-3xl:text-[18px] max-xl:text-[16px]'
247
+ }
248
+ >
249
+ {li.list.slice(-1)[0]}
250
+ </p>
251
+ </div>
252
+ ) : index === 1 ? (
253
+ <div>
254
+ <p
255
+ className={
256
+ 'mb-5 text-[24px] font-[600] leading-[1.4] ' +
257
+ 'max-5xl:text-[22px] ' +
258
+ 'max-3xl:text-[20px] ' +
259
+ 'max-xl:mb-[10px] max-xl:text-[16px]'
260
+ }
261
+ >
262
+ {li.list[0]}
263
+ </p>
264
+ <ul className="text-[20px] leading-[1.8] max-3xl:text-[18px] max-xl:text-[16px]">
265
+ {li.list.slice(1).map((l, l_index) => {
266
+ return (
267
+ <li
268
+ key={l_index}
269
+ className={'flex items-center gap-[10px]'}
270
+ >
271
+ <span
272
+ className={
273
+ 'flex h-6 w-6 items-center justify-center rounded-full border border-solid border-[#5674AE] text-[16px] font-bold text-[#5674AE]'
274
+ }
275
+ >
276
+ {l_index + 1}
277
+ </span>{' '}
278
+ {l}
279
+ </li>
280
+ );
281
+ })}
282
+ </ul>
283
+ </div>
284
+ ) : (
285
+ <div>
286
+ <p
287
+ className={
288
+ 'mb-5 text-[24px] font-[600] leading-[1.4] ' +
289
+ 'max-5xl:text-[22px] ' +
290
+ 'max-3xl:text-[20px] ' +
291
+ 'max-xl:mb-[10px] max-xl:text-[16px] '
292
+ }
293
+ >
294
+ {li.list[0]}
295
+ </p>
296
+ <ul className="text-[20px] leading-[1.8] max-3xl:text-[18px] max-xl:text-[16px]">
297
+ {li.list.slice(1).map((l, l_index) => {
298
+ return <li key={l_index}>•&nbsp;&nbsp;&nbsp;&nbsp;{l}</li>;
299
+ })}
300
+ </ul>
301
+ </div>
302
+ )}
303
+ </div>
304
+ );
305
+ })}
306
+ </div>
307
+ </div>
308
+ </div>
309
+ </div>
310
+ </div>
311
+ </div>
312
+ );
313
+ };
314
+
315
+ const LeftTextItem = ({
316
+ item,
317
+ index
318
+ }: {
319
+ item: {
320
+ title: string;
321
+ desc: string;
322
+ list: string[];
323
+ };
324
+ index: number;
325
+ }) => {
326
+ const imagePath: string = process.env.NEXT_PUBLIC_S3_URL + '';
327
+ const { width } = useBrowser(true);
328
+ const [padding, setPadding] = useState<number>(0);
329
+
330
+ useEffect(() => {
331
+ if (width != 0) {
332
+ if (width > 2119) {
333
+ setPadding((width - 1920 + 80) / 2);
334
+ } else if (width < 2120 && width > 1920) {
335
+ setPadding((width - 1920 + 280) / 2);
336
+ }
337
+ }
338
+ }, [width]);
339
+
340
+ return (
341
+ <div
342
+ className={
343
+ 'mt-[-100px] w-full pr-[calc((100%-1920px+80px)/2)] ' +
344
+ 'max-[2120px]:pr-[calc((100%-1920px+280px)/2)] ' +
345
+ 'max-full:pr-[140px] ' +
346
+ 'max-3xl:pr-20 ' +
347
+ 'max-xl:mt-[-50px] ' +
348
+ 'max-lg:pr-[60px] ' +
349
+ 'max-sm:mt-[-20px] max-sm:pr-5'
350
+ }
351
+ >
352
+ <div className={'relative h-full w-full '}>
353
+ {/*원*/}
354
+ <div
355
+ className={
356
+ 'absolute right-0 top-0 h-[400px] w-[400px] overflow-hidden rounded-full border border-solid border-[#5674AE] ' +
357
+ 'max-xl:h-[200px] max-xl:w-[200px] ' +
358
+ 'max-sm:h-[180px] max-sm:w-[180px]'
359
+ }
360
+ >
361
+ {/*이미지*/}
362
+ <span
363
+ className={
364
+ 'absolute bottom-0 left-0 block h-[299px] w-[279px] overflow-hidden max-xl:h-[149px] max-xl:w-[139px] max-xl:rounded-tr-[100px] max-sm:h-[160px] max-sm:w-[160px]'
365
+ }
366
+ >
367
+ <Image
368
+ src={imagePath + `/strength_new/system_${index + 1}.webp`}
369
+ alt={'강점'}
370
+ fill
371
+ sizes="(max-width: 640px) 160px, (max-width: 1280px) 139px, 279px"
372
+ className={'object-contain object-left max-sm:hidden'}
373
+ quality={100}
374
+ />
375
+ <Image
376
+ src={imagePath + `/strength_new/system_mo_${index + 1}.webp`}
377
+ alt={'강점'}
378
+ fill
379
+ sizes="(max-width: 640px) 160px, (max-width: 1280px) 139px, 279px"
380
+ className={'object-contain object-left sm:hidden'}
381
+ quality={100}
382
+ />
383
+ </span>
384
+ </div>
385
+
386
+ {/*내용*/}
387
+ <div
388
+ className={
389
+ 'relative w-full pr-[120px] pt-[100px] ' +
390
+ 'max-xl:pr-[60px] max-xl:pt-[50px] ' +
391
+ 'max-sm:pr-5 max-sm:pt-5'
392
+ }
393
+ >
394
+ {/*보더*/}
395
+ <div
396
+ style={{ paddingLeft: padding }}
397
+ className={
398
+ 'relative w-full rounded-tr-[100px] border-r border-t border-solid border-r-[#5674AE] border-t-[#5674AE] pb-[100px] pr-[280px] ' +
399
+ 'max-full:!pl-[140px] ' +
400
+ 'max-3xl:!pl-20 ' +
401
+ 'max-xl:pb-[50px] max-xl:pr-[140px] ' +
402
+ 'max-lg:!pl-[60px] ' +
403
+ 'max-md:pr-10 max-md:pt-[140px] ' +
404
+ 'max-sm:!pl-5 max-sm:pb-5 max-sm:pr-0 max-sm:pt-[160px]'
405
+ }
406
+ >
407
+ {/*글자내용*/}
408
+ <div
409
+ className={
410
+ 'relative flex min-h-[360px] w-full flex-col gap-10 px-[120px] pb-[65px] pt-[60px] ' +
411
+ 'max-3xl:gap-7 max-3xl:pr-20 ' +
412
+ 'max-xl:min-h-[228px] max-xl:gap-5 max-xl:p-10 max-xl:pl-[60px] ' +
413
+ 'max-sm:p-5 max-sm:pb-10 '
414
+ }
415
+ >
416
+ <h2
417
+ className={
418
+ 'whitespace-pre-wrap text-[36px] font-[800] leading-[1.3] ' +
419
+ 'max-5xl:text-[34px] ' +
420
+ 'max-3xl:text-[32px] ' +
421
+ 'max-xl:text-[24px] ' +
422
+ 'max-sm:text-[20px]'
423
+ }
424
+ >
425
+ {item.title}
426
+ </h2>
427
+ <p
428
+ className={
429
+ 'relative z-10 whitespace-pre-wrap text-[24px] font-[400] leading-[1.4] ' +
430
+ 'max-5xl:text-[22px] ' +
431
+ 'max-3xl:text-[20px] ' +
432
+ 'max-xl:text-[16px]'
433
+ }
434
+ >
435
+ {item.desc}
436
+ </p>
437
+ <p
438
+ className={
439
+ 'absolute right-[120px] top-[30px] z-0 text-[200px] font-[900] leading-none text-[#E7E7E7] opacity-25 ' +
440
+ 'max-3xl:top-[40px] max-3xl:text-[150px] ' +
441
+ 'max-xl:right-10 max-xl:top-8 max-xl:text-[120px] ' +
442
+ 'max-md2:text-[100px] ' +
443
+ 'max-md:left-[60px] max-md:top-[-65px] ' +
444
+ 'max-sm:left-5 max-sm:top-[-80px] max-sm:text-[80px]'
445
+ }
446
+ >
447
+ 0{index + 1}
448
+ </p>{' '}
449
+ <div
450
+ className={
451
+ 'flex flex-col gap-[60px] border-t border-solid border-[#F6F6F6] pt-10 max-xl:pt-5'
452
+ }
453
+ >
454
+ <ul>
455
+ {item.list.slice(0, -1).map((li, key) => {
456
+ return (
457
+ <li
458
+ className={
459
+ 'flex gap-[10px] pb-5 text-[24px] leading-[1.4] ' +
460
+ 'max-5xl:text-[22px] ' +
461
+ 'max-3xl:text-[20px] ' +
462
+ 'max-xl:text-[16px]'
463
+ }
464
+ key={key}
465
+ >
466
+ <span
467
+ className={
468
+ 'mt-[5px] block h-6 w-6 shrink-0 rounded-full bg-[#5674AE] ' +
469
+ 'max-3xl:h-5 max-3xl:w-5 ' +
470
+ 'max-xl:h-4 max-xl:w-4'
471
+ }
472
+ ></span>
473
+ {li}
474
+ </li>
475
+ );
476
+ })}
477
+ </ul>
478
+ </div>
479
+ <div
480
+ className={
481
+ 'flex h-[166px] w-full items-center justify-center whitespace-pre-wrap rounded-[10px] bg-[#5674AE0D] text-center text-[24px] leading-[1.8] ' +
482
+ 'max-5xl:text-[22px] ' +
483
+ 'max-3xl:text-[20px] ' +
484
+ 'max-xl:text-[16px]'
485
+ }
486
+ >
487
+ {item.list.slice(-1)[0]}
488
+ </div>
489
+ </div>
490
+ </div>
491
+ </div>
492
+ </div>
493
+ </div>
494
+ );
495
+ };
@@ -47,6 +47,7 @@ export interface ISeoTemplateTypes {
47
47
  news_is_use: boolean | null;
48
48
  youtube_is_use: boolean | null;
49
49
  active_faq: boolean;
50
+ faqCount?: number;
50
51
  }
51
52
  export interface IContentsListTypes {
52
53
  center_code: string;
@@ -49,6 +49,7 @@ export interface ISeoTemplateTypes {
49
49
  news_is_use: boolean | null;
50
50
  youtube_is_use: boolean | null;
51
51
  active_faq: boolean;
52
+ faqCount?: number;
52
53
  }
53
54
 
54
55
  export interface IContentsListTypes {
@@ -1,7 +1,8 @@
1
1
  import React from 'react';
2
2
  import { ISeoTemplateTypes } from '../SuccessNewType';
3
- declare const H2Contents: ({ h2Template, index }: {
3
+ declare const H2Contents: ({ h2Template, index, faqCount }: {
4
4
  h2Template: ISeoTemplateTypes;
5
5
  index: number;
6
+ faqCount?: number;
6
7
  }) => React.JSX.Element;
7
8
  export default H2Contents;
@@ -1,17 +1,55 @@
1
1
  import React from 'react';
2
2
  import { htmlUrlDecode } from '../../../../lib';
3
- const H2Contents = ({ h2Template, index }) => {
3
+ const H2Contents = ({ h2Template, index, faqCount }) => {
4
4
  const { active_faq } = h2Template;
5
- return (<div itemScope={active_faq ? undefined : true} itemProp={active_faq ? '' : 'mainEntity'} itemType={active_faq ? '' : 'https://schema.org/Question'}>
6
- <h2 className={'flex h-fit w-full items-center break-keep rounded-[40px] bg-[#285FA7] py-[6.75px] pl-[40px] pr-[20px] -indent-[20px] text-[20px] font-bold leading-[28px] tracking-tight text-white sm:pl-[46px] sm:pr-[26px] sm:text-[26px] sm:leading-[34px] lg:pl-[53px] lg:pr-[33px] lg:text-[31.5px] lg:leading-[38px]'} id={h2Template.idx.toString()} itemProp={active_faq ? '' : 'name'}>
5
+ console.log('h2 active_faq :', active_faq);
6
+ console.log('h2 faqCount :', faqCount);
7
+ const getItemScope = () => {
8
+ if (active_faq === false && faqCount === 0) {
9
+ return true;
10
+ }
11
+ return undefined;
12
+ };
13
+ const getItemProp = (category) => {
14
+ if (active_faq === false && faqCount === 0) {
15
+ switch (category) {
16
+ case 'mainEntity':
17
+ return 'mainEntity';
18
+ case 'acceptedAnswer':
19
+ return 'acceptedAnswer';
20
+ case 'name':
21
+ return 'name';
22
+ case 'text':
23
+ return 'text';
24
+ default:
25
+ undefined;
26
+ }
27
+ }
28
+ return undefined;
29
+ };
30
+ const getItemType = (category) => {
31
+ if (active_faq === false && faqCount === 0) {
32
+ switch (category) {
33
+ case 'question':
34
+ return 'https://schema.org/Question';
35
+ case 'answer':
36
+ return 'https://schema.org/Answer';
37
+ default:
38
+ undefined;
39
+ }
40
+ }
41
+ return undefined;
42
+ };
43
+ return (<div itemScope={getItemScope()} itemProp={getItemProp('mainEntity')} itemType={getItemType('question')}>
44
+ <h2 className={'flex h-fit w-full items-center break-keep rounded-[40px] bg-[#285FA7] py-[6.75px] pl-[40px] pr-[20px] -indent-[20px] text-[20px] font-bold leading-[28px] tracking-tight text-white sm:pl-[46px] sm:pr-[26px] sm:text-[26px] sm:leading-[34px] lg:pl-[53px] lg:pr-[33px] lg:text-[31.5px] lg:leading-[38px]'} id={h2Template.idx.toString()} itemProp={getItemProp('name')}>
7
45
  {index + 1}. {h2Template.tag_title}
8
46
  </h2>
9
47
  <div className={'px-[10px] sm:px-[18px]'}>
10
48
  {/*h2 설명글*/}
11
- <div className={'lg::mt-[37.5px] mb-[44px] mt-[26px] whitespace-break-spaces text-[16px] tracking-[-0.69px] sm:mx-[20px] sm:mx-[33px] sm:mb-[50px] sm:mt-[32px] sm:text-[17.25px] lg:mb-[78px]'} itemScope={active_faq ? undefined : true} itemProp={active_faq ? '' : 'acceptedAnswer'} itemType={active_faq ? '' : 'https://schema.org/Answer'}>
12
- {h2Template.is_editor ? (<div itemProp={active_faq ? '' : 'text'} id={'ck-content'} dangerouslySetInnerHTML={{
49
+ <div className={'lg::mt-[37.5px] mb-[44px] mt-[26px] whitespace-break-spaces text-[16px] tracking-[-0.69px] sm:mx-[20px] sm:mx-[33px] sm:mb-[50px] sm:mt-[32px] sm:text-[17.25px] lg:mb-[78px]'} itemScope={getItemScope()} itemProp={getItemProp('acceptedAnswer')} itemType={getItemType('answer')}>
50
+ {h2Template.is_editor ? (<div itemProp={getItemProp('text')} id={'ck-content'} dangerouslySetInnerHTML={{
13
51
  __html: htmlUrlDecode(h2Template.description.replace('../../UploadFile', '/SE2/upload'))
14
- }}/>) : (<div itemProp={active_faq ? '' : 'text'}>{h2Template.description}</div>)}
52
+ }}/>) : (<div itemProp={getItemProp('text')}>{h2Template.description}</div>)}
15
53
  </div>
16
54
  </div>
17
55
  </div>);