@daeryun/dr_components 0.5.83 → 0.5.86

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 (86) hide show
  1. package/dist/asset/images/SearchBar/search.webp +0 -0
  2. package/dist/asset/images/faq/Ellipse.webp +0 -0
  3. package/dist/asset/images/faq/cal.webp +0 -0
  4. package/dist/asset/images/faq/check.webp +0 -0
  5. package/dist/asset/images/faq/down.webp +0 -0
  6. package/dist/asset/images/faq/eye.webp +0 -0
  7. package/dist/asset/images/faq/plus.webp +0 -0
  8. package/dist/asset/images/faq/right.webp +0 -0
  9. package/dist/asset/images/faq/vector_blu.svg +3 -0
  10. package/dist/asset/images/faq/vector_stroke.svg +3 -0
  11. package/dist/asset/images/fieldNew/field_mark.png +0 -0
  12. package/dist/asset/images/fieldNew/v_arrow.png +0 -0
  13. package/dist/asset/images/fieldNew/vector_blu.png +0 -0
  14. package/dist/asset/images/fieldNew/vector_stroke.png +0 -0
  15. package/dist/asset/images/seo/left.webp +0 -0
  16. package/dist/asset/images/seo/right.webp +0 -0
  17. package/dist/asset/images/seo/secConsulting/choice_call.webp +0 -0
  18. package/dist/asset/images/seo/secConsulting/choice_kakao.webp +0 -0
  19. package/dist/asset/images/seo/secConsulting/online.svg +36 -0
  20. package/dist/asset/images/seo/successCase/dia_dot.svg +3 -0
  21. package/dist/asset/images/seo/successCase/right_arrow.svg +4 -0
  22. package/dist/asset/images/seo/successCase/up_right.svg +3 -0
  23. package/dist/components/FieldNew/RelatedGroup.d.ts +6 -0
  24. package/dist/components/FieldNew/RelatedGroup.jsx +28 -0
  25. package/dist/components/FieldNew/RelatedGroup.stories.d.ts +12 -0
  26. package/dist/components/FieldNew/RelatedGroup.stories.jsx +15 -0
  27. package/dist/components/FieldNew/RelatedGroup.stories.tsx +23 -0
  28. package/dist/components/FieldNew/RelatedGroup.tsx +41 -0
  29. package/dist/components/SearchBar/SearchBar.d.ts +16 -0
  30. package/dist/components/SearchBar/SearchBar.jsx +90 -0
  31. package/dist/components/SearchBar/SearchBar.stories.d.ts +6 -0
  32. package/dist/components/SearchBar/SearchBar.stories.jsx +21 -0
  33. package/dist/components/SearchBar/SearchBar.stories.tsx +28 -0
  34. package/dist/components/SearchBar/SearchBar.tsx +173 -0
  35. package/dist/components/Seo/FieldCase.d.ts +5 -0
  36. package/dist/components/Seo/FieldCase.jsx +48 -0
  37. package/dist/components/Seo/FieldCase.tsx +85 -0
  38. package/dist/components/Seo/Lawyer.d.ts +5 -0
  39. package/dist/components/Seo/Lawyer.jsx +66 -0
  40. package/dist/components/Seo/Lawyer.tsx +148 -0
  41. package/dist/components/Seo/SeoConsulting.d.ts +6 -0
  42. package/dist/components/Seo/SeoConsulting.jsx +173 -0
  43. package/dist/components/Seo/SeoConsulting.tsx +272 -0
  44. package/dist/components/Seo/SuccessCase.d.ts +6 -0
  45. package/dist/components/Seo/SuccessCase.jsx +57 -0
  46. package/dist/components/Seo/SuccessCase.tsx +95 -0
  47. package/dist/components/Seo/right_arrow.svg +4 -0
  48. package/dist/components/TuiViewer/TuiViewer.d.ts +3 -0
  49. package/dist/components/TuiViewer/TuiViewer.jsx +7 -0
  50. package/dist/components/TuiViewer/TuiViewer.tsx +14 -0
  51. package/dist/components/common/strength/index.js +53 -34
  52. package/dist/components/common/strength/index.ts +53 -34
  53. package/dist/components/common/types/faq/index.d.ts +11 -0
  54. package/dist/components/common/types/faq/index.js +1 -0
  55. package/dist/components/common/types/faq/index.ts +11 -0
  56. package/dist/components/common/types/seo/index.d.ts +27 -0
  57. package/dist/components/common/types/seo/index.js +1 -0
  58. package/dist/components/common/types/seo/index.ts +29 -0
  59. package/dist/components/index.js +2 -0
  60. package/dist/components/index.ts +2 -3
  61. package/dist/components/page/Faq/Detail/FaqDetail.d.ts +22 -0
  62. package/dist/components/page/Faq/Detail/FaqDetail.jsx +136 -0
  63. package/dist/components/page/Faq/Detail/FaqDetail.tsx +277 -0
  64. package/dist/components/page/Faq/Detail/FaqList.stories.d.ts +6 -0
  65. package/dist/components/page/Faq/Detail/FaqList.stories.jsx +187 -0
  66. package/dist/components/page/Faq/Detail/FaqList.stories.tsx +208 -0
  67. package/dist/components/page/Faq/FaqList.d.ts +23 -0
  68. package/dist/components/page/Faq/FaqList.jsx +99 -0
  69. package/dist/components/page/Faq/FaqList.stories.d.ts +6 -0
  70. package/dist/components/page/Faq/FaqList.stories.jsx +76 -0
  71. package/dist/components/page/Faq/FaqList.stories.tsx +93 -0
  72. package/dist/components/page/Faq/FaqList.tsx +197 -0
  73. package/dist/components/page/Faq/GroupList.d.ts +9 -0
  74. package/dist/components/page/Faq/GroupList.jsx +30 -0
  75. package/dist/components/page/Faq/GroupList.tsx +57 -0
  76. package/dist/components/page/Faq/GroupSelectBox.d.ts +9 -0
  77. package/dist/components/page/Faq/GroupSelectBox.jsx +67 -0
  78. package/dist/components/page/Faq/GroupSelectBox.tsx +117 -0
  79. package/dist/components/page/Strength/StrengthIntro.jsx +5 -8
  80. package/dist/components/page/Strength/StrengthIntro.tsx +5 -8
  81. package/dist/components/page/index.d.ts +2 -0
  82. package/dist/components/page/index.js +2 -0
  83. package/dist/components/page/index.ts +2 -0
  84. package/dist/styles/globals.css +1148 -6
  85. package/dist/tsconfig.tsbuildinfo +1 -1
  86. package/package.json +1 -1
@@ -0,0 +1,197 @@
1
+ 'use client';
2
+
3
+ import PageTitleBox from '../../PageTitleBox/PageTitleBox';
4
+ import Link from 'next/link';
5
+ import PageWrapper from '../../Layout/PageWrapper';
6
+ import SearchBar from '../../SearchBar/SearchBar';
7
+ import GroupList from './GroupList';
8
+ import GroupSelectBox from './GroupSelectBox';
9
+ import { ImgTypes } from '../../PageTitleBox/ImgTypes';
10
+ import { IFaqTypes } from '../../common/types/faq';
11
+ import Image from 'next/image';
12
+ import PaginationComponent from '../MyCase/_component/_pagination/PaginationComponent';
13
+
14
+ import EyeImg from '../../../asset/images/faq/eye.webp';
15
+ import PlusImg from '../../../asset/images/faq/plus.webp';
16
+
17
+ interface ISearchBarProps {
18
+ handleInputChange: (e: React.FormEvent<HTMLInputElement>) => void;
19
+ handleSearch: () => void;
20
+ searchInput: string;
21
+ }
22
+ interface IPaginationProps {
23
+ onPaginationChange: (pageNum: number) => void;
24
+ currentPage: number;
25
+ totalCount: number;
26
+ }
27
+
28
+ interface FaqListProps {
29
+ SearchBarProps: ISearchBarProps;
30
+ PaginationProps: IPaginationProps;
31
+ groupList: { code: string; code_name: string | null; code_desc: string | null }[];
32
+ faqList: IFaqTypes[];
33
+ }
34
+
35
+ const FaqList = ({ SearchBarProps, PaginationProps, groupList, faqList }: FaqListProps) => {
36
+ return (
37
+ <>
38
+ <PageTitleBox
39
+ titleTxt={'법률지식인'}
40
+ subTxt={
41
+ <span>
42
+ 법률 궁금증 비전문가, 광고성 답변에 지쳤다면?
43
+ <br />
44
+ 대륜의 전문변호사가 답변 드리겠습니다.
45
+ </span>
46
+ }
47
+ imgType={ImgTypes.FAQ}
48
+ />
49
+ <PageWrapper className={'tracking-[-0.5px]'}>
50
+ <span className={'h-auto w-auto'}>
51
+ <SearchBar
52
+ label={'법률지식인 검색창'}
53
+ onChange={SearchBarProps.handleInputChange}
54
+ onClick={SearchBarProps.handleSearch}
55
+ search={SearchBarProps.searchInput}
56
+ placeholder={''}
57
+ isKeyPress={true}
58
+ marginTop={[70, 50, 50]}
59
+ marginBottom={0}
60
+ />
61
+ </span>
62
+ <section className={'mb-[50px] mt-[100px] w-full max-xl:mt-[80px] max-md:mt-[40px] '}>
63
+ <div
64
+ className={
65
+ 'flex w-full gap-[84px] pb-10 max-xl:gap-0 max-xl:pb-0 max-md:flex-col max-md:gap-[58px]'
66
+ }
67
+ >
68
+ {/*pc 768px 이상*/}
69
+ <GroupList groupList={groupList} />
70
+
71
+ {/*mo 768px 미만*/}
72
+ <GroupSelectBox groupList={groupList} />
73
+
74
+ <ul className={'relative flex w-full flex-col border-t-[4px] border-solid border-t-black'}>
75
+ {faqList && faqList.length > 0 ? (
76
+ faqList.map((item, key) => {
77
+ return (
78
+ <li key={item.idx} className={'h-fit w-full'}>
79
+ <Link
80
+ href={`/faq/detail/${item.idx}`}
81
+ className={
82
+ 'max-md:pb- flex h-[218px] w-full border-b-[1px] border-solid border-b-[#E8E8E8] px-5 py-9 max-xl:h-[210px] max-xl:py-8 max-md:h-[213px] max-md:px-0 max-md:pb-6 max-md:pt-7'
83
+ }
84
+ >
85
+ <p
86
+ className={
87
+ 'mr-8 text-[32px] font-[900] max-xl:mr-6 max-xl:text-[28px] max-md:mr-5 max-md:leading-[1.3]'
88
+ }
89
+ >
90
+ Q
91
+ </p>
92
+ <span className={'flex h-full w-full flex-col'}>
93
+ <p
94
+ className={
95
+ 'mb-3 line-clamp-1 text-[24px] font-[700] leading-[1.3] max-xl:line-clamp-2 max-xl:text-[20px] max-md:mb-2'
96
+ }
97
+ >
98
+ {item.question}
99
+ </p>
100
+ <p
101
+ className={
102
+ 'line-clamp-2 text-[18px] font-[400] text-[#919191] max-xl:text-[16px] max-md:line-clamp-3 max-md:text-[14px]'
103
+ }
104
+ >
105
+ {item.question_contents}
106
+ </p>
107
+ <span
108
+ className={
109
+ 'mt-auto flex w-full items-center gap-[18px] text-[16px] text-[#A5A5A5] max-xl:gap-3 max-xl:text-[14px] max-md:text-[12px]'
110
+ }
111
+ >
112
+ <p className={'flex items-center leading-none'}>
113
+ <Image
114
+ src={EyeImg}
115
+ alt={'법률지식인'}
116
+ width={24}
117
+ height={24}
118
+ className={'h-auto w-6 max-xl:w-5 '}
119
+ />
120
+ <span className={'ml-1 mr-3 font-[700] max-xl:mr-2'}>
121
+ 조회수
122
+ </span>
123
+ {item.hit?.toLocaleString()}
124
+ </p>
125
+ {/* <Image
126
+ src={'/images/faq/eye.webp'}
127
+ alt={'법률지식인'}
128
+ width={4}
129
+ height={4}
130
+ className={'h-auto w-1'}
131
+ />
132
+ <p className={'flex items-center leading-none'}>
133
+ <Image
134
+ src={'/images/faq/cal.webp'}
135
+ alt={'법률지식인'}
136
+ width={24}
137
+ height={24}
138
+ className={'mr-3 h-auto w-6 max-xl:mr-2 max-xl:w-5'}
139
+ />
140
+ {dayjs(item.created_at).format('YYYY.MM.DD')}
141
+ </p> */}
142
+ </span>
143
+ </span>
144
+ <span
145
+ className={
146
+ 'ml-[100px] flex shrink-0 flex-col items-center gap-1 pt-[6px] text-[16px] font-[400] leading-[1.3] text-[#919191] max-xl:ml-10 max-xl:pt-[14px] max-md:ml-6 max-md:pt-0 max-md:text-[12px]'
147
+ }
148
+ >
149
+ <Image
150
+ src={PlusImg}
151
+ alt={'법률지식인'}
152
+ width={50}
153
+ height={50}
154
+ className={'h-auto w-[50px] max-md:w-8'}
155
+ />
156
+ 자세히보기
157
+ </span>
158
+ </Link>
159
+ </li>
160
+ );
161
+ })
162
+ ) : (
163
+ <div className={'m-auto mb-20 mt-40 flex flex-col items-center font-[SUIT] '}>
164
+ <div
165
+ className={
166
+ 'relative flex h-[80px] w-[80px] items-center justify-center rounded-full border-[2px] border-solid border-[#30539D] text-[50px] font-[900] leading-none text-[#30539D]'
167
+ }
168
+ >
169
+ !
170
+ </div>
171
+ <p className={'mt-4 text-[26px] font-[800] text-[#30539D] max-sm:text-[22px]'}>
172
+ 검색 결과가 없습니다.
173
+ </p>
174
+ </div>
175
+ )}
176
+ </ul>
177
+ </div>
178
+
179
+ {faqList && faqList.length > 0 ? (
180
+ <div className={'pb-5 max-xl:pb-0'}>
181
+ {/*pc margin 100px*/}
182
+ <PaginationComponent
183
+ onChange={PaginationProps.onPaginationChange}
184
+ current={PaginationProps.currentPage}
185
+ total={PaginationProps.totalCount}
186
+ pageSize={9}
187
+ />
188
+ </div>
189
+ ) : (
190
+ <></>
191
+ )}
192
+ </section>
193
+ </PageWrapper>
194
+ </>
195
+ );
196
+ };
197
+ export default FaqList;
@@ -0,0 +1,9 @@
1
+ import React from 'react';
2
+ declare const GroupList: ({ groupList }: {
3
+ groupList: {
4
+ code: string;
5
+ code_name: string | null;
6
+ code_desc: string | null;
7
+ }[];
8
+ }) => React.JSX.Element;
9
+ export default GroupList;
@@ -0,0 +1,30 @@
1
+ 'use client';
2
+ import React, { useEffect, useState } from 'react';
3
+ import Image from 'next/image';
4
+ import Link from 'next/link';
5
+ import IconRight from '../../../asset/images/faq/right.webp';
6
+ import { usePathname } from 'next/navigation';
7
+ const GroupList = ({ groupList }) => {
8
+ const pathname = usePathname();
9
+ const [select, setSelect] = useState('');
10
+ useEffect(() => {
11
+ setSelect(String(pathname.replace('/faq/', '')));
12
+ }, [pathname]);
13
+ return (<div className="relative w-[350px] shrink-0 max-xl:w-[240px] max-md:hidden ">
14
+ <p className={'mb-8 px-3 py-[10px] text-[32px] font-[900] max-xl:mb-5 max-xl:text-[24px]'}>업무분야</p>
15
+
16
+ <ul className="flex flex-col gap-3 max-xl:gap-1" role="none">
17
+ {groupList.map((item, index) => (<li key={index + item.code} className={'h-full w-full'} role="menuitem">
18
+ <Link href={`/faq/${item.code_desc}`} className={'flex w-full cursor-pointer items-center justify-between p-3 text-[24px] font-[400] leading-[1.28] ' +
19
+ 'group transition-[background-color,color] hover:bg-[#F7F7FD] hover:font-[700] hover:text-[#30539D] ' +
20
+ 'max-xl:text-[20px] ' +
21
+ (select === item.code_desc ? 'bg-[#F7F7FD] font-[700] text-[#30539D] ' : '')}>
22
+ <p className={'line-clamp-1 '}>{item.code_name}</p>
23
+ <Image src={IconRight} alt={item.code_name + ' 법률지식인'} width={25} height={25} className={'h-auto w-6 opacity-0 transition-[opacity] group-hover:opacity-100 ' +
24
+ (select === item.code_desc ? 'opacity-100 ' : '')}/>
25
+ </Link>
26
+ </li>))}
27
+ </ul>
28
+ </div>);
29
+ };
30
+ export default GroupList;
@@ -0,0 +1,57 @@
1
+ 'use client';
2
+
3
+ import React, { useEffect, useState } from 'react';
4
+ import Image from 'next/image';
5
+ import Link from 'next/link';
6
+
7
+ import IconRight from '../../../asset/images/faq/right.webp';
8
+ import { usePathname } from 'next/navigation';
9
+
10
+ const GroupList = ({
11
+ groupList
12
+ }: {
13
+ groupList: { code: string; code_name: string | null; code_desc: string | null }[];
14
+ }) => {
15
+ const pathname = usePathname();
16
+ const [select, setSelect] = useState<string>('');
17
+
18
+ useEffect(() => {
19
+ setSelect(String(pathname.replace('/faq/', '')));
20
+ }, [pathname]);
21
+
22
+ return (
23
+ <div className="relative w-[350px] shrink-0 max-xl:w-[240px] max-md:hidden ">
24
+ <p className={'mb-8 px-3 py-[10px] text-[32px] font-[900] max-xl:mb-5 max-xl:text-[24px]'}>업무분야</p>
25
+
26
+ <ul className="flex flex-col gap-3 max-xl:gap-1" role="none">
27
+ {groupList.map((item, index) => (
28
+ <li key={index + item.code} className={'h-full w-full'} role="menuitem">
29
+ <Link
30
+ href={`/faq/${item.code_desc}`}
31
+ className={
32
+ 'flex w-full cursor-pointer items-center justify-between p-3 text-[24px] font-[400] leading-[1.28] ' +
33
+ 'group transition-[background-color,color] hover:bg-[#F7F7FD] hover:font-[700] hover:text-[#30539D] ' +
34
+ 'max-xl:text-[20px] ' +
35
+ (select === item.code_desc ? 'bg-[#F7F7FD] font-[700] text-[#30539D] ' : '')
36
+ }
37
+ >
38
+ <p className={'line-clamp-1 '}>{item.code_name}</p>
39
+ <Image
40
+ src={IconRight}
41
+ alt={item.code_name + ' 법률지식인'}
42
+ width={25}
43
+ height={25}
44
+ className={
45
+ 'h-auto w-6 opacity-0 transition-[opacity] group-hover:opacity-100 ' +
46
+ (select === item.code_desc ? 'opacity-100 ' : '')
47
+ }
48
+ />
49
+ </Link>
50
+ </li>
51
+ ))}
52
+ </ul>
53
+ </div>
54
+ );
55
+ };
56
+
57
+ export default GroupList;
@@ -0,0 +1,9 @@
1
+ import React from 'react';
2
+ declare const GroupSelectBox: ({ groupList }: {
3
+ groupList: {
4
+ code: string;
5
+ code_name: string | null;
6
+ code_desc: string | null;
7
+ }[];
8
+ }) => React.JSX.Element;
9
+ export default GroupSelectBox;
@@ -0,0 +1,67 @@
1
+ 'use client';
2
+ import React, { useEffect, useState } from 'react';
3
+ import { usePathname, useRouter } from 'next/navigation';
4
+ import IconArrow from '../../../asset/images/faq/vector_stroke.svg';
5
+ import IconArrowAct from '../../../asset/images/faq/vector_blu.svg';
6
+ const GroupSelectBox = ({ groupList }) => {
7
+ const router = useRouter();
8
+ const [select, setSelect] = useState('');
9
+ const [showAllFields, setShowAllFields] = useState(false);
10
+ const pathname = usePathname();
11
+ const previewCount = 8;
12
+ const displayedFields = !showAllFields ? groupList.slice(0, previewCount) : groupList;
13
+ useEffect(() => {
14
+ setSelect(String(pathname.replace('/faq/', '')));
15
+ }, [pathname]);
16
+ const scrollToList = () => {
17
+ var _a, _b;
18
+ const location = (_b = (_a = document.getElementById('faq_list')) === null || _a === void 0 ? void 0 : _a.offsetTop) !== null && _b !== void 0 ? _b : 0;
19
+ window.scrollTo({ top: location + 230, behavior: 'smooth' });
20
+ };
21
+ useEffect(() => {
22
+ if (pathname.startsWith('/faq') && select && groupList.some(item => item.code_desc === select)) {
23
+ scrollToList();
24
+ }
25
+ }, [pathname, select]);
26
+ //수정전
27
+ // const handleChange = (e: React.ChangeEvent<HTMLSelectElement>) => {
28
+ // const selectedValue = e.target.value
29
+ // setSelect(selectedValue)
30
+ // router.push(`/faq/${selectedValue}`)
31
+ // }
32
+ return (<div className="relative w-full md:hidden">
33
+ <p className="text-[24px] font-[900] ">업무분야</p>
34
+ <div className={'relative mt-[20px] grid grid-cols-2 ' +
35
+ 'before:absolute before:bottom-0 before:left-0 before:h-[1px] before:w-full before:bg-[#D7D7D7] '}>
36
+ {displayedFields.map((item, index) => {
37
+ return (<button onClick={() => {
38
+ setSelect(item.code_desc || '');
39
+ router.push(`/faq/${item.code_desc}`);
40
+ }} key={index} className={`${select === item.code_desc ? 'font-[700] text-[#30539D] ' : ''}` +
41
+ 'group flex border-b border-solid border-[#D7D7D7] p-[10px] sm:p-[12px]'}>
42
+ <span className={`${select === item.code_desc ? 'bg-[#ECF0F4] ' : ''}` +
43
+ 'flex w-full items-center justify-between gap-[5px] px-2 py-[6px] text-left group-hover:bg-[#ECF0F4] sm:px-[16px] '}>
44
+ <p className={'pr-[1px] text-[14px] group-hover:pr-0 group-hover:font-[700] group-hover:text-[#30539D] sm:text-[16px] lg:text-[20px]'}>
45
+ {item.code_name}
46
+ </p>
47
+ <IconArrow className={`${select === item.code_desc ? 'hidden ' : ''}` + 'shrink-0 group-hover:hidden'}/>
48
+ <IconArrowAct className={`${select === item.code_desc ? 'block ' : 'hidden '}` +
49
+ 'shrink-0 group-hover:block'}/>
50
+ </span>
51
+ </button>);
52
+ })}
53
+ </div>
54
+ <div className={'m-auto mb-[10px] mt-[40px] flex w-full items-center'}>
55
+ {groupList.length > previewCount && (<button onClick={() => {
56
+ setShowAllFields(!showAllFields);
57
+ }} className={'relative mx-auto flex h-[36px] w-auto items-center justify-between border border-solid border-[#192D56] bg-[#fff] pl-[16px] pr-[36px] text-[16px] font-[700] text-[#192D56] ' +
58
+ 'before:absolute before:right-[20px] before:top-1/2 before:h-[12px] before:w-[1px] before:-translate-y-1/2 before:bg-[#192D56] before:content-[""] ' +
59
+ 'after:absolute after:right-[14.5px] after:top-1/2 after:h-[1px] after:w-[12px] after:-translate-y-1/2 after:bg-[#192D56] after:content-[""] ' +
60
+ `${showAllFields ? 'before:hidden ' : ''}`}>
61
+ {showAllFields ? '닫기' : '분야 더보기'}
62
+ <div className={'absolute bottom-[-5px] left-[-5px] z-[-1] h-full w-full bg-[#192D56] '}></div>
63
+ </button>)}
64
+ </div>
65
+ </div>);
66
+ };
67
+ export default GroupSelectBox;
@@ -0,0 +1,117 @@
1
+ 'use client';
2
+
3
+ import React, { useEffect, useState } from 'react';
4
+ import { usePathname, useRouter } from 'next/navigation';
5
+
6
+ import IconArrow from '../../../asset/images/faq/vector_stroke.svg';
7
+ import IconArrowAct from '../../../asset/images/faq/vector_blu.svg';
8
+
9
+ const GroupSelectBox = ({
10
+ groupList
11
+ }: {
12
+ groupList: { code: string; code_name: string | null; code_desc: string | null }[];
13
+ }) => {
14
+ const router = useRouter();
15
+ const [select, setSelect] = useState<string>('');
16
+ const [showAllFields, setShowAllFields] = useState(false);
17
+ const pathname = usePathname();
18
+ const previewCount = 8;
19
+
20
+ const displayedFields = !showAllFields ? groupList.slice(0, previewCount) : groupList;
21
+
22
+ useEffect(() => {
23
+ setSelect(String(pathname.replace('/faq/', '')));
24
+ }, [pathname]);
25
+
26
+ const scrollToList = () => {
27
+ const location = document.getElementById('faq_list')?.offsetTop ?? 0;
28
+ window.scrollTo({ top: location + 230, behavior: 'smooth' });
29
+ };
30
+
31
+ useEffect(() => {
32
+ if (pathname.startsWith('/faq') && select && groupList.some(item => item.code_desc === select)) {
33
+ scrollToList();
34
+ }
35
+ }, [pathname, select]);
36
+
37
+ //수정전
38
+ // const handleChange = (e: React.ChangeEvent<HTMLSelectElement>) => {
39
+ // const selectedValue = e.target.value
40
+ // setSelect(selectedValue)
41
+ // router.push(`/faq/${selectedValue}`)
42
+ // }
43
+
44
+ return (
45
+ <div className="relative w-full md:hidden">
46
+ <p className="text-[24px] font-[900] ">업무분야</p>
47
+ <div
48
+ className={
49
+ 'relative mt-[20px] grid grid-cols-2 ' +
50
+ 'before:absolute before:bottom-0 before:left-0 before:h-[1px] before:w-full before:bg-[#D7D7D7] '
51
+ }
52
+ >
53
+ {displayedFields.map((item, index) => {
54
+ return (
55
+ <button
56
+ onClick={() => {
57
+ setSelect(item.code_desc || '');
58
+ router.push(`/faq/${item.code_desc}`);
59
+ }}
60
+ key={index}
61
+ className={
62
+ `${select === item.code_desc ? 'font-[700] text-[#30539D] ' : ''}` +
63
+ 'group flex border-b border-solid border-[#D7D7D7] p-[10px] sm:p-[12px]'
64
+ }
65
+ >
66
+ <span
67
+ className={
68
+ `${select === item.code_desc ? 'bg-[#ECF0F4] ' : ''}` +
69
+ 'flex w-full items-center justify-between gap-[5px] px-2 py-[6px] text-left group-hover:bg-[#ECF0F4] sm:px-[16px] '
70
+ }
71
+ >
72
+ <p
73
+ className={
74
+ 'pr-[1px] text-[14px] group-hover:pr-0 group-hover:font-[700] group-hover:text-[#30539D] sm:text-[16px] lg:text-[20px]'
75
+ }
76
+ >
77
+ {item.code_name}
78
+ </p>
79
+ <IconArrow
80
+ className={
81
+ `${select === item.code_desc ? 'hidden ' : ''}` + 'shrink-0 group-hover:hidden'
82
+ }
83
+ />
84
+ <IconArrowAct
85
+ className={
86
+ `${select === item.code_desc ? 'block ' : 'hidden '}` +
87
+ 'shrink-0 group-hover:block'
88
+ }
89
+ />
90
+ </span>
91
+ </button>
92
+ );
93
+ })}
94
+ </div>
95
+ <div className={'m-auto mb-[10px] mt-[40px] flex w-full items-center'}>
96
+ {groupList.length > previewCount && (
97
+ <button
98
+ onClick={() => {
99
+ setShowAllFields(!showAllFields);
100
+ }}
101
+ className={
102
+ 'relative mx-auto flex h-[36px] w-auto items-center justify-between border border-solid border-[#192D56] bg-[#fff] pl-[16px] pr-[36px] text-[16px] font-[700] text-[#192D56] ' +
103
+ 'before:absolute before:right-[20px] before:top-1/2 before:h-[12px] before:w-[1px] before:-translate-y-1/2 before:bg-[#192D56] before:content-[""] ' +
104
+ 'after:absolute after:right-[14.5px] after:top-1/2 after:h-[1px] after:w-[12px] after:-translate-y-1/2 after:bg-[#192D56] after:content-[""] ' +
105
+ `${showAllFields ? 'before:hidden ' : ''}`
106
+ }
107
+ >
108
+ {showAllFields ? '닫기' : '분야 더보기'}
109
+ <div className={'absolute bottom-[-5px] left-[-5px] z-[-1] h-full w-full bg-[#192D56] '}></div>
110
+ </button>
111
+ )}
112
+ </div>
113
+ </div>
114
+ );
115
+ };
116
+
117
+ export default GroupSelectBox;
@@ -45,7 +45,7 @@ const StrengthIntro = ({ initialData }) => {
45
45
  <span className={'mb-[60px] block h-[50px] w-[1.5px] rotate-[45deg] bg-white max-xl:mb-[36px] max-md:mb-4'}></span>
46
46
 
47
47
  <p className={'text-center text-[32px] tracking-[-1.28px] text-white max-md:text-[24px] '}>
48
- 우리가 모든 법률 고민에
48
+ 로펌 대륜이 모든 법률 고민에
49
49
  <br /> 자신있는 이유
50
50
  </p>
51
51
 
@@ -118,12 +118,9 @@ const StrengthIntro = ({ initialData }) => {
118
118
  'max-xl:h-[250px] max-xl:pl-[30px] ' +
119
119
  'max-md:h-[160px] max-md:pl-[30px] '}>
120
120
  <span>
121
- 매달 <br className={'max-md:hidden'}/>
122
- <LgText isSmall className={'text-[#AB0634]'}>
123
- 4,000
124
- </LgText>
125
- <span className={'text-[#AB0634]'}> 명</span> 이상 <br className={'xl:hidden'}/>
126
- 개인ㆍ법인 법률상담
121
+ 밀착 케어를 위한
122
+ <br />
123
+ <b>변호 업무 집중 시스템</b>
127
124
  </span>
128
125
  <Arrow isRed/>
129
126
  </span>
@@ -192,7 +189,7 @@ const StrengthIntro = ({ initialData }) => {
192
189
  <LgText isSmall>365</LgText> 일, <br className={'max-xl:hidden max-md:block'}/>
193
190
  <span className={'block md:translate-y-[-15px]'}>
194
191
  <LgText isSmall>24</LgText> 시간 <br />
195
- <span className={'text-black'}>상담·긴급대응 가능 로펌</span>
192
+ <span className={'text-black'}>상담·긴급대응</span>
196
193
  </span>
197
194
  </span>
198
195
  <Arrow isRed/>
@@ -68,7 +68,7 @@ const StrengthIntro = ({ initialData }: { initialData: IInitialDataTypes }) => {
68
68
  ></span>
69
69
 
70
70
  <p className={'text-center text-[32px] tracking-[-1.28px] text-white max-md:text-[24px] '}>
71
- 우리가 모든 법률 고민에
71
+ 로펌 대륜이 모든 법률 고민에
72
72
  <br /> 자신있는 이유
73
73
  </p>
74
74
 
@@ -169,12 +169,9 @@ const StrengthIntro = ({ initialData }: { initialData: IInitialDataTypes }) => {
169
169
  }
170
170
  >
171
171
  <span>
172
- 매달 <br className={'max-md:hidden'} />
173
- <LgText isSmall className={'text-[#AB0634]'}>
174
- 4,000
175
- </LgText>
176
- <span className={'text-[#AB0634]'}> 명</span> 이상 <br className={'xl:hidden'} />
177
- 개인ㆍ법인 법률상담
172
+ 밀착 케어를 위한
173
+ <br />
174
+ <b>변호 업무 집중 시스템</b>
178
175
  </span>
179
176
  <Arrow isRed />
180
177
  </span>
@@ -274,7 +271,7 @@ const StrengthIntro = ({ initialData }: { initialData: IInitialDataTypes }) => {
274
271
  <LgText isSmall>365</LgText> 일, <br className={'max-xl:hidden max-md:block'} />
275
272
  <span className={'block md:translate-y-[-15px]'}>
276
273
  <LgText isSmall>24</LgText> 시간 <br />
277
- <span className={'text-black'}>상담·긴급대응 가능 로펌</span>
274
+ <span className={'text-black'}>상담·긴급대응</span>
278
275
  </span>
279
276
  </span>
280
277
  <Arrow isRed />
@@ -8,3 +8,5 @@ export { default as MyCaseDetailPage } from './MyCase/[id]/MyCaseDetailPage';
8
8
  export { default as Login } from './Login/Login';
9
9
  export { default as Sign } from './Login/Sign';
10
10
  export { default as logout } from './Login/_api/logout';
11
+ export { default as FaqList } from './Faq/FaqList';
12
+ export { default as FaqDetail } from './Faq/Detail/FaqDetail';
@@ -10,3 +10,5 @@ export { default as MyCaseDetailPage } from './MyCase/[id]/MyCaseDetailPage';
10
10
  export { default as Login } from './Login/Login';
11
11
  export { default as Sign } from './Login/Sign';
12
12
  export { default as logout } from './Login/_api/logout';
13
+ export { default as FaqList } from './Faq/FaqList';
14
+ export { default as FaqDetail } from './Faq/Detail/FaqDetail';
@@ -10,3 +10,5 @@ export { default as MyCaseDetailPage } from './MyCase/[id]/MyCaseDetailPage';
10
10
  export { default as Login } from './Login/Login';
11
11
  export { default as Sign } from './Login/Sign';
12
12
  export { default as logout } from './Login/_api/logout';
13
+ export { default as FaqList } from './Faq/FaqList';
14
+ export { default as FaqDetail } from './Faq/Detail/FaqDetail';