@daeryun/dr_components 0.1.78 → 0.1.80
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/asset/images/BrochureBtn/download_btn.webp +0 -0
- package/dist/components/BrochureBtn/BrochureBtn.d.ts +7 -0
- package/dist/components/BrochureBtn/BrochureBtn.jsx +27 -0
- package/dist/components/BrochureBtn/BrochureBtn.stories.d.ts +14 -0
- package/dist/components/BrochureBtn/BrochureBtn.stories.jsx +12 -0
- package/dist/components/BrochureBtn/BrochureBtn.stories.tsx +20 -0
- package/dist/components/BrochureBtn/BrochureBtn.tsx +43 -0
- package/dist/components/Footer/Footer.stories.d.ts +1 -0
- package/dist/components/Footer/Footer.stories.jsx +16 -0
- package/dist/components/Footer/Footer.stories.tsx +19 -0
- package/dist/components/Footer/IFooterTypes.d.ts +1 -0
- package/dist/components/Footer/IFooterTypes.ts +1 -0
- package/dist/components/Footer/index.d.ts +1 -1
- package/dist/components/Footer/index.jsx +85 -73
- package/dist/components/Footer/index.tsx +220 -149
- package/dist/styles/globals.css +101 -0
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +1 -1
|
Binary file
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import Link from 'next/link';
|
|
2
|
+
import Image from 'next/image';
|
|
3
|
+
import btnImg from '../../asset/images/BrochureBtn/download_btn.webp';
|
|
4
|
+
const BrochureBtn = (props) => {
|
|
5
|
+
const { rounded = true, width = '100%', height = '100%', className = '' } = props;
|
|
6
|
+
const downloadUrl = 'https://d1tgonli21s4df.cloudfront.net/comp/daeryunBrochure.pdf';
|
|
7
|
+
return (<Link href={downloadUrl} target={'_blank'} style={{
|
|
8
|
+
width: width,
|
|
9
|
+
height: height,
|
|
10
|
+
borderRadius: rounded ? '1000px' : '0'
|
|
11
|
+
}} className={'p-2 flex border-[1px] border-solid border-[#215eaa] text-[#215eaa] relative ' +
|
|
12
|
+
`${rounded ? 'gap-[10px] ' : ' flex-row-reverse justify-around '}` +
|
|
13
|
+
className
|
|
14
|
+
// ' transition-all hover:bg-[#215eaa] hover:text-white'
|
|
15
|
+
}>
|
|
16
|
+
<span className={'block relative h-full aspect-square'}>
|
|
17
|
+
<Image src={btnImg} alt={'Brochure Download'} width={40} height={40} className={'w-full h-full object-contain'} quality={100}/>
|
|
18
|
+
</span>
|
|
19
|
+
<span className={'h-full flex flex-col justify-around'}>
|
|
20
|
+
<p className={'uppercase text-[16px] leading-none font-[500] '}>
|
|
21
|
+
Brochure <span className={'font-[800]'}>download</span>
|
|
22
|
+
</p>
|
|
23
|
+
<p className={'font-[800] text-[14px] leading-none '}>기업법무 브로슈어</p>
|
|
24
|
+
</span>
|
|
25
|
+
</Link>);
|
|
26
|
+
};
|
|
27
|
+
export default BrochureBtn;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import type { StoryObj } from '@storybook/react';
|
|
2
|
+
import '../../styles/globals.css';
|
|
3
|
+
declare const meta: {
|
|
4
|
+
component: (props: {
|
|
5
|
+
rounded?: boolean;
|
|
6
|
+
width?: string;
|
|
7
|
+
height?: string;
|
|
8
|
+
className?: string;
|
|
9
|
+
}) => import("react").JSX.Element;
|
|
10
|
+
title: string;
|
|
11
|
+
};
|
|
12
|
+
export default meta;
|
|
13
|
+
type Story = StoryObj<typeof meta>;
|
|
14
|
+
export declare const Default: Story;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import BrochureBtn from './BrochureBtn';
|
|
2
|
+
import '../../styles/globals.css';
|
|
3
|
+
const meta = {
|
|
4
|
+
component: BrochureBtn, //컴포넌트
|
|
5
|
+
title: 'BrochureBtn' //스토리 이름
|
|
6
|
+
};
|
|
7
|
+
export default meta;
|
|
8
|
+
export const Default = {
|
|
9
|
+
render: () => (<div className={'w-full pt-10 h-[100vh]'}>
|
|
10
|
+
<BrochureBtn rounded={false} width={'280px'} height={'55px'} className={''}/>
|
|
11
|
+
</div>)
|
|
12
|
+
};
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import BrochureBtn from './BrochureBtn';
|
|
2
|
+
import { categoryListExample, centerListExample } from '../common';
|
|
3
|
+
import type { Meta, StoryObj } from '@storybook/react';
|
|
4
|
+
import '../../styles/globals.css';
|
|
5
|
+
|
|
6
|
+
const meta = {
|
|
7
|
+
component: BrochureBtn, //컴포넌트
|
|
8
|
+
title: 'BrochureBtn' //스토리 이름
|
|
9
|
+
} satisfies Meta<typeof BrochureBtn>;
|
|
10
|
+
|
|
11
|
+
export default meta;
|
|
12
|
+
type Story = StoryObj<typeof meta>;
|
|
13
|
+
|
|
14
|
+
export const Default: Story = {
|
|
15
|
+
render: () => (
|
|
16
|
+
<div className={'w-full pt-10 h-[100vh]'}>
|
|
17
|
+
<BrochureBtn rounded={false} width={'280px'} height={'55px'} className={''} />
|
|
18
|
+
</div>
|
|
19
|
+
)
|
|
20
|
+
};
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import Link from 'next/link';
|
|
2
|
+
import Image from 'next/image';
|
|
3
|
+
import btnImg from '../../asset/images/BrochureBtn/download_btn.webp';
|
|
4
|
+
const BrochureBtn = (props: { rounded?: boolean; width?: string; height?: string; className?: string }) => {
|
|
5
|
+
const { rounded = true, width = '100%', height = '100%', className = '' } = props;
|
|
6
|
+
const downloadUrl = 'https://d1tgonli21s4df.cloudfront.net/comp/daeryunBrochure.pdf';
|
|
7
|
+
return (
|
|
8
|
+
<Link
|
|
9
|
+
href={downloadUrl}
|
|
10
|
+
target={'_blank'}
|
|
11
|
+
style={{
|
|
12
|
+
width: width,
|
|
13
|
+
height: height,
|
|
14
|
+
borderRadius: rounded ? '1000px' : '0'
|
|
15
|
+
}}
|
|
16
|
+
className={
|
|
17
|
+
'p-2 flex border-[1px] border-solid border-[#215eaa] text-[#215eaa] relative ' +
|
|
18
|
+
`${rounded ? 'gap-[10px] ' : ' flex-row-reverse justify-around '}` +
|
|
19
|
+
className
|
|
20
|
+
// ' transition-all hover:bg-[#215eaa] hover:text-white'
|
|
21
|
+
}
|
|
22
|
+
>
|
|
23
|
+
<span className={'block relative h-full aspect-square'}>
|
|
24
|
+
<Image
|
|
25
|
+
src={btnImg}
|
|
26
|
+
alt={'Brochure Download'}
|
|
27
|
+
width={40}
|
|
28
|
+
height={40}
|
|
29
|
+
className={'w-full h-full object-contain'}
|
|
30
|
+
quality={100}
|
|
31
|
+
/>
|
|
32
|
+
</span>
|
|
33
|
+
<span className={'h-full flex flex-col justify-around'}>
|
|
34
|
+
<p className={'uppercase text-[16px] leading-none font-[500] '}>
|
|
35
|
+
Brochure <span className={'font-[800]'}>download</span>
|
|
36
|
+
</p>
|
|
37
|
+
<p className={'font-[800] text-[14px] leading-none '}>기업법무 브로슈어</p>
|
|
38
|
+
</span>
|
|
39
|
+
</Link>
|
|
40
|
+
);
|
|
41
|
+
};
|
|
42
|
+
|
|
43
|
+
export default BrochureBtn;
|
|
@@ -18,6 +18,22 @@ export const Default = {
|
|
|
18
18
|
tel: '1800-7905',
|
|
19
19
|
logo: Logo,
|
|
20
20
|
groupsData: [],
|
|
21
|
+
isBrochureBtn: true,
|
|
22
|
+
aceUrl: 'https://example.com'
|
|
23
|
+
}
|
|
24
|
+
};
|
|
25
|
+
export const noBrochureBtn = {
|
|
26
|
+
render: args => {
|
|
27
|
+
const queryClient = new QueryClient();
|
|
28
|
+
return (<QueryClientProvider client={queryClient}>
|
|
29
|
+
<Footer {...args}/>
|
|
30
|
+
</QueryClientProvider>);
|
|
31
|
+
},
|
|
32
|
+
args: {
|
|
33
|
+
tel: '1800-7905',
|
|
34
|
+
logo: Logo,
|
|
35
|
+
groupsData: [],
|
|
36
|
+
isBrochureBtn: false,
|
|
21
37
|
aceUrl: 'https://example.com'
|
|
22
38
|
}
|
|
23
39
|
};
|
|
@@ -26,6 +26,25 @@ export const Default: Story = {
|
|
|
26
26
|
tel: '1800-7905',
|
|
27
27
|
logo: Logo,
|
|
28
28
|
groupsData: [],
|
|
29
|
+
isBrochureBtn: true,
|
|
30
|
+
aceUrl: 'https://example.com'
|
|
31
|
+
}
|
|
32
|
+
};
|
|
33
|
+
|
|
34
|
+
export const noBrochureBtn: Story = {
|
|
35
|
+
render: args => {
|
|
36
|
+
const queryClient = new QueryClient();
|
|
37
|
+
return (
|
|
38
|
+
<QueryClientProvider client={queryClient}>
|
|
39
|
+
<Footer {...args} />
|
|
40
|
+
</QueryClientProvider>
|
|
41
|
+
);
|
|
42
|
+
},
|
|
43
|
+
args: {
|
|
44
|
+
tel: '1800-7905',
|
|
45
|
+
logo: Logo,
|
|
46
|
+
groupsData: [],
|
|
47
|
+
isBrochureBtn: false,
|
|
29
48
|
aceUrl: 'https://example.com'
|
|
30
49
|
}
|
|
31
50
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { INewFooterTypes } from './IFooterTypes';
|
|
3
|
-
declare const NewFooter: ({ groupsData, tel, logo, aceUrl }: INewFooterTypes) => React.JSX.Element;
|
|
3
|
+
declare const NewFooter: ({ groupsData, tel, logo, aceUrl, isBrochureBtn }: INewFooterTypes) => React.JSX.Element;
|
|
4
4
|
export default NewFooter;
|
|
@@ -21,8 +21,8 @@ import sns02 from '/public/images/footer/sns_02.webp';
|
|
|
21
21
|
import sns03 from '/public/images/footer/sns_03.webp';
|
|
22
22
|
import sns04 from '/public/images/footer/sns_04.webp';
|
|
23
23
|
import sns05 from '/public/images/footer/sns_05.webp';
|
|
24
|
-
|
|
25
|
-
|
|
24
|
+
import BrochureBtn from '../BrochureBtn/BrochureBtn';
|
|
25
|
+
const NewFooter = ({ groupsData, tel, logo, aceUrl, isBrochureBtn }) => {
|
|
26
26
|
const router = useRouter();
|
|
27
27
|
const mobile = require('is-mobile');
|
|
28
28
|
const snsClass = 'w-[44px] h-auto mr-[5px] max-md:w-[40px] max-md:m-0 max-xs:w-[45px] max-xs:mr-[17px] max-2xs:w-[40px] max-3xs:w-[35px]';
|
|
@@ -152,6 +152,7 @@ const NewFooter = ({ groupsData, tel, logo, aceUrl }) => {
|
|
|
152
152
|
setIsMobile(mobile());
|
|
153
153
|
}, []);
|
|
154
154
|
return (<footer className={'relative mb-[30px] flex h-[550px] w-full items-center justify-center border-t border-solid border-[#A8A8A8] bg-white font-[SUIT] text-[18px] ' +
|
|
155
|
+
(isBrochureBtn ? 'max-xl:h-[650px] max-md:h-[600px] ' : '') +
|
|
155
156
|
'max-xs:h-[800px] ' +
|
|
156
157
|
'max-lg:mb-[70px] ' +
|
|
157
158
|
'max-2xs:h-[730px]'}>
|
|
@@ -163,83 +164,26 @@ const NewFooter = ({ groupsData, tel, logo, aceUrl }) => {
|
|
|
163
164
|
</Wrapper>
|
|
164
165
|
<Wrapper id={'footer'}>
|
|
165
166
|
<div className={'w-full'}>
|
|
166
|
-
<div className={'mb-[77px] font-[800] tracking-[-0px] xs:flex xs:items-center ' +
|
|
167
|
-
'max-xl:
|
|
167
|
+
<div className={'mb-[77px] font-[800] tracking-[-0px] max-xl:mb-[50px] max-xl:justify-center xs:flex xs:items-center ' +
|
|
168
|
+
(isBrochureBtn ? ' max-xl:flex-col max-xl:gap-[40px]' : ' max-xl:gap-[5%] ')}>
|
|
168
169
|
<Link href={'/'}>
|
|
169
|
-
<Image src={logo} alt="대륜 로고" width={216} height={33} className={'mr-[4.27vw] h-auto
|
|
170
|
+
<Image src={logo} alt="대륜 로고" width={216} height={33} className={'mr-[4.27vw] h-auto w-[208px] max-3xl:mr-[2vw] max-md:w-[180px] max-2xs:w-[148px] '}/>
|
|
170
171
|
</Link>
|
|
171
|
-
|
|
172
172
|
<div className={'flex gap-[36px] max-xxl:gap-[20px] max-xl:hidden '}>
|
|
173
173
|
<FooterLinkList />
|
|
174
174
|
</div>
|
|
175
|
+
{isBrochureBtn ? (<span className={'flex w-full flex-1 items-center justify-center gap-[40px] max-md:gap-[5px] max-2sm:gap-[10px]'}>
|
|
176
|
+
<FooterSelectBox wrapperRef={wrapperRef} groupsData={groupsData} isGroups={isGroups} routeLocation={routeLocation} setIsOpen={setIsOpen} isOpen={isOpen} isBrochureBtn={isBrochureBtn}/>
|
|
177
|
+
{isBrochureBtn ? (<BrochureBtn width={'280px'} height={'58px'} className={'xl:hidden ' +
|
|
178
|
+
//768px
|
|
179
|
+
'max-md:mx-[-10px] max-md:scale-90 ' +
|
|
180
|
+
//530px
|
|
181
|
+
'max-[530px]:mx-[-30px] max-[530px]:scale-[.8] ' +
|
|
182
|
+
//480px
|
|
183
|
+
'max-xs:hidden'}/>) : (<></>)}
|
|
184
|
+
</span>) : (<FooterSelectBox wrapperRef={wrapperRef} groupsData={groupsData} isGroups={isGroups} routeLocation={routeLocation} setIsOpen={setIsOpen} isOpen={isOpen} isBrochureBtn={isBrochureBtn}/>)}
|
|
175
185
|
|
|
176
|
-
<
|
|
177
|
-
<div ref={wrapperRef} className={'relative h-[68px] w-[290px] ' +
|
|
178
|
-
'max-xxl:w-[240px] ' +
|
|
179
|
-
'max-xl:w-[299px] ' +
|
|
180
|
-
'max-md:h-[53px] max-md:w-[260px] ' +
|
|
181
|
-
'max-sm:h-[48px] max-sm:w-[230px] ' +
|
|
182
|
-
'z-10 max-xs:mt-[8.2vw] max-xs:h-[55px] max-xs:w-full '}>
|
|
183
|
-
<button type="button" className={'border-gray-[#707070] h-full w-full appearance-none border border-solid bg-white pr-[30px] font-normal focus:outline-8 focus:outline-blue-500 ' +
|
|
184
|
-
'max-xxl:text-[16px] ' +
|
|
185
|
-
'max-md:text-[14px] ' +
|
|
186
|
-
'max-xs:pl-[9.8%] max-xs:text-left max-xs:text-[3.93vw] ' +
|
|
187
|
-
'max-3xs:text-[4.2vw] '} onClick={() => setIsOpen(!isOpen)} aria-haspopup="listbox" aria-expanded="true">
|
|
188
|
-
법무법인 대륜 그룹 바로가기
|
|
189
|
-
</button>
|
|
190
|
-
|
|
191
|
-
<ul className={`absolute right-0 mt-2 h-[340px] w-full origin-top-right overflow-y-auto rounded-md bg-white pt-3 shadow-lg ring-1 ring-black ring-opacity-5 transition-all duration-150 focus:outline-none ${isOpen ? 'visible opacity-100' : 'invisible opacity-0'}`} style={{
|
|
192
|
-
zIndex: isOpen ? 50 : -9999,
|
|
193
|
-
pointerEvents: isOpen ? 'auto' : 'none'
|
|
194
|
-
}} role="listbox" aria-orientation="vertical" aria-labelledby="listbox-label" aria-expanded="true" aria-hidden="false">
|
|
195
|
-
{routeLocation
|
|
196
|
-
? groupsData === null || groupsData === void 0 ? void 0 : groupsData.map((item, index) => (
|
|
197
|
-
// 메인페이지로 접근했을 때, 서버사이드에서 가져온 데이터로 색인
|
|
198
|
-
<React.Fragment key={index}>
|
|
199
|
-
<li key={index} value={item.code_name} className="cursor-pointer px-5 py-[5px] text-[17px] font-[500] duration-150 hover:bg-gray-100">
|
|
200
|
-
<Link href={getDomainHandler(item.code, item.code_desc)} key={index} target="_blank" title={item.code_name} onClick={() => {
|
|
201
|
-
setIsOpen(!isOpen);
|
|
202
|
-
}}>
|
|
203
|
-
{item.code === 'CT0000'
|
|
204
|
-
? item.code_name
|
|
205
|
-
: `${item.code_name} 그룹`}
|
|
206
|
-
</Link>
|
|
207
|
-
</li>
|
|
208
|
-
{item.children.length > 0 &&
|
|
209
|
-
item.children.map((childGroup) => (<li key={childGroup.code} value={childGroup.code_name} className="cursor-pointer px-9 py-[5px] text-[15px] font-[500] duration-150 hover:bg-gray-100">
|
|
210
|
-
<Link href={childGroup.etc2} key={index} target="_blank" title={childGroup.codename} onClick={() => {
|
|
211
|
-
setIsOpen(!isOpen);
|
|
212
|
-
}}>
|
|
213
|
-
{childGroup.code_name} 센터
|
|
214
|
-
</Link>
|
|
215
|
-
</li>))}
|
|
216
|
-
</React.Fragment>))
|
|
217
|
-
: (_a = isGroups.list) === null || _a === void 0 ? void 0 : _a.map((item, index) => (
|
|
218
|
-
// 메인페이지가 아닌 경로로 유입되었을 때, api 호출하여 받은 데이터. 색인 x
|
|
219
|
-
<React.Fragment key={index}>
|
|
220
|
-
<li key={index} value={item.code_name} className="cursor-pointer px-5 py-[5px] text-[17px] font-[500] duration-150 hover:bg-gray-100">
|
|
221
|
-
<Link href={getDomainHandler(item.code, item.code_desc)} key={index} target="_blank" title={item.code_name} onClick={() => {
|
|
222
|
-
setIsOpen(!isOpen);
|
|
223
|
-
}}>
|
|
224
|
-
{item.code === 'CT0000'
|
|
225
|
-
? item.code_name
|
|
226
|
-
: `${item.code_name} 그룹`}
|
|
227
|
-
</Link>
|
|
228
|
-
</li>
|
|
229
|
-
{item.children.length > 0 &&
|
|
230
|
-
item.children.map((childGroup) => (<li key={childGroup.code} value={childGroup.code_name} className="cursor-pointer px-9 py-[5px] text-[15px] font-[500] duration-150 hover:bg-gray-100">
|
|
231
|
-
<Link href={childGroup.etc2} key={index} target="_blank" title={childGroup.codename} onClick={() => {
|
|
232
|
-
setIsOpen(!isOpen);
|
|
233
|
-
}}>
|
|
234
|
-
{childGroup.code_name} 센터
|
|
235
|
-
</Link>
|
|
236
|
-
</li>))}
|
|
237
|
-
</React.Fragment>))}
|
|
238
|
-
</ul>
|
|
239
|
-
|
|
240
|
-
<Image draggable={false} src={process.env.NEXT_PUBLIC_S3_URL + '/comp-asset/section10/icon_arrow_gray.webp'} alt={'select icon'} width={28} height={15} className={'absolute right-[10%] top-[50%] w-[15px] translate-y-[-50%] max-sm:w-[14px]'}/>
|
|
241
|
-
</div>
|
|
242
|
-
</div>
|
|
186
|
+
{isBrochureBtn ? (<BrochureBtn rounded={false} width={'100%'} height={'55px'} className={'mt-[20px] xs:hidden'}/>) : (<></>)}
|
|
243
187
|
</div>
|
|
244
188
|
|
|
245
189
|
{/*xl일때부터 or en*/}
|
|
@@ -298,6 +242,7 @@ const NewFooter = ({ groupsData, tel, logo, aceUrl }) => {
|
|
|
298
242
|
<Link href="https://www.instagram.com/daeryun_lawfirm/?utm_medium=copy_link" target="_blank" rel="noopener noreferrer">
|
|
299
243
|
<Image draggable={false} src={sns05} alt="법무법인(유한) 대륜 인스타그램" width={66} height={66} className={snsClass}/>
|
|
300
244
|
</Link>
|
|
245
|
+
{isBrochureBtn ? (<BrochureBtn width={'280px'} height={'58px'} className={'ml-4 -translate-y-2 max-xl:hidden'}/>) : (<></>)}
|
|
301
246
|
</div>
|
|
302
247
|
</div>
|
|
303
248
|
</Wrapper>
|
|
@@ -333,3 +278,70 @@ const FooterLinkList = () => {
|
|
|
333
278
|
</p>
|
|
334
279
|
</>);
|
|
335
280
|
};
|
|
281
|
+
const FooterSelectBox = (props) => {
|
|
282
|
+
var _a;
|
|
283
|
+
const { isBrochureBtn, wrapperRef, setIsOpen, isOpen, routeLocation, groupsData, isGroups } = props;
|
|
284
|
+
return (<div className={(isBrochureBtn ? 'max-xs:w-full' : '') + ' xl:ml-auto'}>
|
|
285
|
+
<div ref={wrapperRef} className={'relative h-[68px] w-[290px] ' +
|
|
286
|
+
'max-xxl:w-[240px] ' +
|
|
287
|
+
'max-xl:w-[299px] ' +
|
|
288
|
+
'max-md:h-[53px] max-md:w-[260px] ' +
|
|
289
|
+
'max-sm:h-[48px] max-sm:w-[230px] ' +
|
|
290
|
+
'z-10 max-xs:mt-[8.2vw] max-xs:h-[55px] max-xs:w-full '}>
|
|
291
|
+
<button type="button" className={'border-gray-[#707070] h-full w-full appearance-none border border-solid bg-white pr-[30px] font-normal focus:outline-8 focus:outline-blue-500 ' +
|
|
292
|
+
'max-xxl:text-[16px] ' +
|
|
293
|
+
'max-md:text-[14px] ' +
|
|
294
|
+
'max-xs:pl-[9.8%] max-xs:text-left max-xs:text-[3.93vw] ' +
|
|
295
|
+
'max-3xs:text-[4.2vw] '} onClick={() => setIsOpen(!isOpen)} aria-haspopup="listbox" aria-expanded="true">
|
|
296
|
+
법무법인 대륜 그룹 바로가기
|
|
297
|
+
</button>
|
|
298
|
+
|
|
299
|
+
<ul className={`absolute right-0 mt-2 h-[340px] w-full origin-top-right overflow-y-auto rounded-md bg-white pt-3 shadow-lg ring-1 ring-black ring-opacity-5 transition-all duration-150 focus:outline-none ${isOpen ? 'visible opacity-100' : 'invisible opacity-0'}`} style={{
|
|
300
|
+
zIndex: isOpen ? 50 : -9999,
|
|
301
|
+
pointerEvents: isOpen ? 'auto' : 'none'
|
|
302
|
+
}} role="listbox" aria-orientation="vertical" aria-labelledby="listbox-label" aria-expanded="true" aria-hidden="false">
|
|
303
|
+
{routeLocation
|
|
304
|
+
? groupsData === null || groupsData === void 0 ? void 0 : groupsData.map((item, index) => (
|
|
305
|
+
// 메인페이지로 접근했을 때, 서버사이드에서 가져온 데이터로 색인
|
|
306
|
+
<React.Fragment key={index}>
|
|
307
|
+
<li key={index} value={item.code_name} className="cursor-pointer px-5 py-[5px] text-[17px] font-[500] duration-150 hover:bg-gray-100">
|
|
308
|
+
<Link href={getDomainHandler(item.code, item.code_desc)} key={index} target="_blank" title={item.code_name} onClick={() => {
|
|
309
|
+
setIsOpen(!isOpen);
|
|
310
|
+
}}>
|
|
311
|
+
{item.code === 'CT0000' ? item.code_name : `${item.code_name} 그룹`}
|
|
312
|
+
</Link>
|
|
313
|
+
</li>
|
|
314
|
+
{item.children.length > 0 &&
|
|
315
|
+
item.children.map((childGroup) => (<li key={childGroup.code} value={childGroup.code_name} className="cursor-pointer px-9 py-[5px] text-[15px] font-[500] duration-150 hover:bg-gray-100">
|
|
316
|
+
<Link href={childGroup.etc2} key={index} target="_blank" title={childGroup.codename} onClick={() => {
|
|
317
|
+
setIsOpen(!isOpen);
|
|
318
|
+
}}>
|
|
319
|
+
{childGroup.code_name} 센터
|
|
320
|
+
</Link>
|
|
321
|
+
</li>))}
|
|
322
|
+
</React.Fragment>))
|
|
323
|
+
: (_a = isGroups.list) === null || _a === void 0 ? void 0 : _a.map((item, index) => (
|
|
324
|
+
// 메인페이지가 아닌 경로로 유입되었을 때, api 호출하여 받은 데이터. 색인 x
|
|
325
|
+
<React.Fragment key={index}>
|
|
326
|
+
<li key={index} value={item.code_name} className="cursor-pointer px-5 py-[5px] text-[17px] font-[500] duration-150 hover:bg-gray-100">
|
|
327
|
+
<Link href={getDomainHandler(item.code, item.code_desc)} key={index} target="_blank" title={item.code_name} onClick={() => {
|
|
328
|
+
setIsOpen(!isOpen);
|
|
329
|
+
}}>
|
|
330
|
+
{item.code === 'CT0000' ? item.code_name : `${item.code_name} 그룹`}
|
|
331
|
+
</Link>
|
|
332
|
+
</li>
|
|
333
|
+
{item.children.length > 0 &&
|
|
334
|
+
item.children.map((childGroup) => (<li key={childGroup.code} value={childGroup.code_name} className="cursor-pointer px-9 py-[5px] text-[15px] font-[500] duration-150 hover:bg-gray-100">
|
|
335
|
+
<Link href={childGroup.etc2} key={index} target="_blank" title={childGroup.codename} onClick={() => {
|
|
336
|
+
setIsOpen(!isOpen);
|
|
337
|
+
}}>
|
|
338
|
+
{childGroup.code_name} 센터
|
|
339
|
+
</Link>
|
|
340
|
+
</li>))}
|
|
341
|
+
</React.Fragment>))}
|
|
342
|
+
</ul>
|
|
343
|
+
|
|
344
|
+
<Image draggable={false} src={process.env.NEXT_PUBLIC_S3_URL + '/comp-asset/section10/icon_arrow_gray.webp'} alt={'select icon'} width={28} height={15} className={'absolute right-[10%] top-[50%] w-[15px] translate-y-[-50%] max-sm:w-[14px]'}/>
|
|
345
|
+
</div>
|
|
346
|
+
</div>);
|
|
347
|
+
};
|