@daeryun/dr_components 0.6.14 → 0.6.15
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/components/page/Faq/FaqList.d.ts +2 -1
- package/dist/components/page/Faq/FaqList.jsx +3 -3
- package/dist/components/page/Faq/FaqList.tsx +4 -3
- package/dist/components/page/Faq/GroupList.d.ts +2 -1
- package/dist/components/page/Faq/GroupList.jsx +7 -2
- package/dist/components/page/Faq/GroupList.tsx +8 -2
- package/dist/components/page/Faq/GroupSelectBox.d.ts +2 -1
- package/dist/components/page/Faq/GroupSelectBox.jsx +7 -2
- package/dist/components/page/Faq/GroupSelectBox.tsx +8 -2
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +1 -1
|
@@ -18,6 +18,7 @@ interface FaqListProps {
|
|
|
18
18
|
code_desc: string | null;
|
|
19
19
|
}[];
|
|
20
20
|
faqList: IFaqTypes[];
|
|
21
|
+
currentCodeDesc?: string;
|
|
21
22
|
}
|
|
22
|
-
declare const FaqList: ({ SearchBarProps, PaginationProps, groupList, faqList }: FaqListProps) => import("react").JSX.Element;
|
|
23
|
+
declare const FaqList: ({ SearchBarProps, PaginationProps, groupList, faqList, currentCodeDesc }: FaqListProps) => import("react").JSX.Element;
|
|
23
24
|
export default FaqList;
|
|
@@ -10,7 +10,7 @@ import Image from 'next/image';
|
|
|
10
10
|
import PaginationComponent from '../MyCase/_component/_pagination/PaginationComponent';
|
|
11
11
|
import EyeImg from '../../../asset/images/faq/eye.webp';
|
|
12
12
|
import PlusImg from '../../../asset/images/faq/plus.webp';
|
|
13
|
-
const FaqList = ({ SearchBarProps, PaginationProps, groupList, faqList }) => {
|
|
13
|
+
const FaqList = ({ SearchBarProps, PaginationProps, groupList, faqList, currentCodeDesc }) => {
|
|
14
14
|
return (<>
|
|
15
15
|
<PageTitleBox titleTxt={'법률지식인'} subTxt={<span>
|
|
16
16
|
법률 궁금증 비전문가, 광고성 답변에 지쳤다면?
|
|
@@ -24,10 +24,10 @@ const FaqList = ({ SearchBarProps, PaginationProps, groupList, faqList }) => {
|
|
|
24
24
|
<section className={'mb-[50px] mt-[100px] w-full max-xl:mt-[80px] max-md:mt-[40px] '}>
|
|
25
25
|
<div className={'flex w-full gap-[84px] pb-10 max-xl:gap-0 max-xl:pb-0 max-md:flex-col max-md:gap-[58px]'}>
|
|
26
26
|
{/*pc 768px 이상*/}
|
|
27
|
-
<GroupList groupList={groupList}/>
|
|
27
|
+
<GroupList groupList={groupList} currentCodeDesc={currentCodeDesc}/>
|
|
28
28
|
|
|
29
29
|
{/*mo 768px 미만*/}
|
|
30
|
-
<GroupSelectBox groupList={groupList}/>
|
|
30
|
+
<GroupSelectBox groupList={groupList} currentCodeDesc={currentCodeDesc}/>
|
|
31
31
|
|
|
32
32
|
<ul id={'faq_list'} className={'relative flex w-full flex-col border-t-[4px] border-solid border-t-black'}>
|
|
33
33
|
{faqList && faqList.length > 0 ? (faqList.map((item, key) => {
|
|
@@ -30,9 +30,10 @@ interface FaqListProps {
|
|
|
30
30
|
PaginationProps: IPaginationProps;
|
|
31
31
|
groupList: { code: string; code_name: string | null; code_desc: string | null }[];
|
|
32
32
|
faqList: IFaqTypes[];
|
|
33
|
+
currentCodeDesc?: string;
|
|
33
34
|
}
|
|
34
35
|
|
|
35
|
-
const FaqList = ({ SearchBarProps, PaginationProps, groupList, faqList }: FaqListProps) => {
|
|
36
|
+
const FaqList = ({ SearchBarProps, PaginationProps, groupList, faqList, currentCodeDesc }: FaqListProps) => {
|
|
36
37
|
return (
|
|
37
38
|
<>
|
|
38
39
|
<PageTitleBox
|
|
@@ -66,10 +67,10 @@ const FaqList = ({ SearchBarProps, PaginationProps, groupList, faqList }: FaqLis
|
|
|
66
67
|
}
|
|
67
68
|
>
|
|
68
69
|
{/*pc 768px 이상*/}
|
|
69
|
-
<GroupList groupList={groupList} />
|
|
70
|
+
<GroupList groupList={groupList} currentCodeDesc={currentCodeDesc} />
|
|
70
71
|
|
|
71
72
|
{/*mo 768px 미만*/}
|
|
72
|
-
<GroupSelectBox groupList={groupList} />
|
|
73
|
+
<GroupSelectBox groupList={groupList} currentCodeDesc={currentCodeDesc} />
|
|
73
74
|
|
|
74
75
|
<ul
|
|
75
76
|
id={'faq_list'}
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
declare const GroupList: ({ groupList }: {
|
|
2
|
+
declare const GroupList: ({ groupList, currentCodeDesc }: {
|
|
3
3
|
groupList: {
|
|
4
4
|
code: string;
|
|
5
5
|
code_name: string | null;
|
|
6
6
|
code_desc: string | null;
|
|
7
7
|
}[];
|
|
8
|
+
currentCodeDesc?: string;
|
|
8
9
|
}) => React.JSX.Element;
|
|
9
10
|
export default GroupList;
|
|
@@ -4,11 +4,16 @@ import Image from 'next/image';
|
|
|
4
4
|
import Link from 'next/link';
|
|
5
5
|
import IconRight from '../../../asset/images/faq/right.webp';
|
|
6
6
|
import { usePathname } from 'next/navigation';
|
|
7
|
-
const GroupList = ({ groupList }) => {
|
|
7
|
+
const GroupList = ({ groupList, currentCodeDesc }) => {
|
|
8
8
|
const pathname = usePathname();
|
|
9
9
|
const [select, setSelect] = useState('');
|
|
10
10
|
useEffect(() => {
|
|
11
|
-
|
|
11
|
+
if (pathname === '/faq' && currentCodeDesc) {
|
|
12
|
+
setSelect(currentCodeDesc);
|
|
13
|
+
}
|
|
14
|
+
else {
|
|
15
|
+
setSelect(String(pathname.replace('/faq/', '')));
|
|
16
|
+
}
|
|
12
17
|
}, [pathname]);
|
|
13
18
|
return (<div className="relative w-[350px] shrink-0 max-xl:w-[240px] max-md:hidden ">
|
|
14
19
|
<p className={'mb-8 px-3 py-[10px] text-[32px] font-[900] max-xl:mb-5 max-xl:text-[24px]'}>업무분야</p>
|
|
@@ -8,15 +8,21 @@ import IconRight from '../../../asset/images/faq/right.webp';
|
|
|
8
8
|
import { usePathname } from 'next/navigation';
|
|
9
9
|
|
|
10
10
|
const GroupList = ({
|
|
11
|
-
groupList
|
|
11
|
+
groupList,
|
|
12
|
+
currentCodeDesc
|
|
12
13
|
}: {
|
|
13
14
|
groupList: { code: string; code_name: string | null; code_desc: string | null }[];
|
|
15
|
+
currentCodeDesc?: string;
|
|
14
16
|
}) => {
|
|
15
17
|
const pathname = usePathname();
|
|
16
18
|
const [select, setSelect] = useState<string>('');
|
|
17
19
|
|
|
18
20
|
useEffect(() => {
|
|
19
|
-
|
|
21
|
+
if (pathname === '/faq' && currentCodeDesc) {
|
|
22
|
+
setSelect(currentCodeDesc);
|
|
23
|
+
} else {
|
|
24
|
+
setSelect(String(pathname.replace('/faq/', '')));
|
|
25
|
+
}
|
|
20
26
|
}, [pathname]);
|
|
21
27
|
|
|
22
28
|
return (
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
declare const GroupSelectBox: ({ groupList }: {
|
|
2
|
+
declare const GroupSelectBox: ({ groupList, currentCodeDesc }: {
|
|
3
3
|
groupList: {
|
|
4
4
|
code: string;
|
|
5
5
|
code_name: string | null;
|
|
6
6
|
code_desc: string | null;
|
|
7
7
|
}[];
|
|
8
|
+
currentCodeDesc?: string;
|
|
8
9
|
}) => React.JSX.Element;
|
|
9
10
|
export default GroupSelectBox;
|
|
@@ -3,7 +3,7 @@ import React, { useEffect, useState } from 'react';
|
|
|
3
3
|
import { usePathname, useRouter } from 'next/navigation';
|
|
4
4
|
import IconArrow from '../../../asset/images/faq/vector_stroke.svg';
|
|
5
5
|
import IconArrowAct from '../../../asset/images/faq/vector_blu.svg';
|
|
6
|
-
const GroupSelectBox = ({ groupList }) => {
|
|
6
|
+
const GroupSelectBox = ({ groupList, currentCodeDesc }) => {
|
|
7
7
|
const router = useRouter();
|
|
8
8
|
const [select, setSelect] = useState('');
|
|
9
9
|
const [showAllFields, setShowAllFields] = useState(false);
|
|
@@ -12,7 +12,12 @@ const GroupSelectBox = ({ groupList }) => {
|
|
|
12
12
|
const [shouldScroll, setShouldScroll] = useState(false);
|
|
13
13
|
const displayedFields = !showAllFields ? groupList.slice(0, previewCount) : groupList;
|
|
14
14
|
useEffect(() => {
|
|
15
|
-
|
|
15
|
+
if (pathname === '/faq' && currentCodeDesc) {
|
|
16
|
+
setSelect(currentCodeDesc);
|
|
17
|
+
}
|
|
18
|
+
else {
|
|
19
|
+
setSelect(String(pathname.replace('/faq/', '')));
|
|
20
|
+
}
|
|
16
21
|
}, [pathname]);
|
|
17
22
|
const scrollToList = () => {
|
|
18
23
|
var _a, _b;
|
|
@@ -7,9 +7,11 @@ import IconArrow from '../../../asset/images/faq/vector_stroke.svg';
|
|
|
7
7
|
import IconArrowAct from '../../../asset/images/faq/vector_blu.svg';
|
|
8
8
|
|
|
9
9
|
const GroupSelectBox = ({
|
|
10
|
-
groupList
|
|
10
|
+
groupList,
|
|
11
|
+
currentCodeDesc
|
|
11
12
|
}: {
|
|
12
13
|
groupList: { code: string; code_name: string | null; code_desc: string | null }[];
|
|
14
|
+
currentCodeDesc?: string;
|
|
13
15
|
}) => {
|
|
14
16
|
const router = useRouter();
|
|
15
17
|
const [select, setSelect] = useState<string>('');
|
|
@@ -22,7 +24,11 @@ const GroupSelectBox = ({
|
|
|
22
24
|
const displayedFields = !showAllFields ? groupList.slice(0, previewCount) : groupList;
|
|
23
25
|
|
|
24
26
|
useEffect(() => {
|
|
25
|
-
|
|
27
|
+
if (pathname === '/faq' && currentCodeDesc) {
|
|
28
|
+
setSelect(currentCodeDesc);
|
|
29
|
+
} else {
|
|
30
|
+
setSelect(String(pathname.replace('/faq/', '')));
|
|
31
|
+
}
|
|
26
32
|
}, [pathname]);
|
|
27
33
|
|
|
28
34
|
const scrollToList = () => {
|