@daeryun/dr_components 0.1.18 → 0.1.19
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/Footer/Footer.stories.jsx +4 -3
- package/dist/components/Footer/Footer.stories.tsx +15 -14
- package/dist/components/Footer/IFooterTypes.d.ts +6 -0
- package/dist/components/Footer/IFooterTypes.js +0 -1
- package/dist/components/Footer/IFooterTypes.ts +7 -1
- package/dist/components/Footer/index.d.ts +3 -9
- package/dist/components/Footer/index.jsx +62 -52
- package/dist/components/Footer/index.tsx +84 -84
- package/dist/styles/globals.css +6 -2
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +1 -1
|
@@ -8,7 +8,7 @@ const meta = {
|
|
|
8
8
|
};
|
|
9
9
|
export default meta;
|
|
10
10
|
export const Default = {
|
|
11
|
-
render:
|
|
11
|
+
render: args => {
|
|
12
12
|
const queryClient = new QueryClient();
|
|
13
13
|
return (<QueryClientProvider client={queryClient}>
|
|
14
14
|
<Footer {...args}/>
|
|
@@ -16,7 +16,8 @@ export const Default = {
|
|
|
16
16
|
},
|
|
17
17
|
args: {
|
|
18
18
|
tel: '1800-7905',
|
|
19
|
-
|
|
20
|
-
|
|
19
|
+
logo: Logo,
|
|
20
|
+
groupsData: [],
|
|
21
|
+
aceUrl: 'https://example.com'
|
|
21
22
|
}
|
|
22
23
|
};
|
|
@@ -1,30 +1,31 @@
|
|
|
1
|
-
import Footer from './index'
|
|
2
|
-
import type { Meta, StoryObj } from '@storybook/react'
|
|
3
|
-
import '../../styles/globals.css'
|
|
4
|
-
import { QueryClient, QueryClientProvider } from 'react-query'
|
|
5
|
-
import Logo from '../../asset/images/footer/logo_b.webp'
|
|
1
|
+
import Footer from './index';
|
|
2
|
+
import type { Meta, StoryObj } from '@storybook/react';
|
|
3
|
+
import '../../styles/globals.css';
|
|
4
|
+
import { QueryClient, QueryClientProvider } from 'react-query';
|
|
5
|
+
import Logo from '../../asset/images/footer/logo_b.webp';
|
|
6
6
|
|
|
7
7
|
const meta: Meta<typeof Footer> = {
|
|
8
8
|
component: Footer,
|
|
9
9
|
title: 'Footer'
|
|
10
|
-
}
|
|
10
|
+
};
|
|
11
11
|
|
|
12
|
-
export default meta
|
|
12
|
+
export default meta;
|
|
13
13
|
|
|
14
|
-
type Story = StoryObj<typeof meta
|
|
14
|
+
type Story = StoryObj<typeof meta>;
|
|
15
15
|
|
|
16
16
|
export const Default: Story = {
|
|
17
|
-
render:
|
|
18
|
-
const queryClient = new QueryClient()
|
|
17
|
+
render: args => {
|
|
18
|
+
const queryClient = new QueryClient();
|
|
19
19
|
return (
|
|
20
20
|
<QueryClientProvider client={queryClient}>
|
|
21
21
|
<Footer {...args} />
|
|
22
22
|
</QueryClientProvider>
|
|
23
|
-
)
|
|
23
|
+
);
|
|
24
24
|
},
|
|
25
25
|
args: {
|
|
26
26
|
tel: '1800-7905',
|
|
27
|
-
|
|
28
|
-
|
|
27
|
+
logo: Logo,
|
|
28
|
+
groupsData: [],
|
|
29
|
+
aceUrl: 'https://example.com'
|
|
29
30
|
}
|
|
30
|
-
}
|
|
31
|
+
};
|
|
@@ -1,10 +1,4 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
logoUrl: string;
|
|
6
|
-
aceCountLink?: string;
|
|
7
|
-
groupsData: IGroupsData[] | null;
|
|
8
|
-
}
|
|
9
|
-
declare const Footer: ({ groupsData, tel, logoUrl, aceCountLink }: IFooterTypes) => React.JSX.Element;
|
|
10
|
-
export default Footer;
|
|
2
|
+
import { INewFooterTypes } from './IFooterTypes';
|
|
3
|
+
declare const NewFooter: ({ groupsData, tel, logo, aceUrl }: INewFooterTypes) => React.JSX.Element;
|
|
4
|
+
export default NewFooter;
|
|
@@ -13,16 +13,15 @@ import * as gtag from '../../lib/gtag';
|
|
|
13
13
|
import Link from 'next/link';
|
|
14
14
|
import { getDomainHandler, insert } from '../../lib';
|
|
15
15
|
import { savePowerLinkConversion } from '../../lib';
|
|
16
|
-
import TopBtn from './TopBtn';
|
|
17
16
|
import Wrapper from '../Layout/Wrapper';
|
|
17
|
+
import TopBtn from './TopBtn';
|
|
18
18
|
import { useRouter } from 'next/router';
|
|
19
|
-
import
|
|
20
|
-
import
|
|
21
|
-
import
|
|
22
|
-
import
|
|
23
|
-
import
|
|
24
|
-
|
|
25
|
-
const Footer = ({ groupsData, tel, logoUrl, aceCountLink }) => {
|
|
19
|
+
import sns01 from '/public/images/footer/sns_01.webp';
|
|
20
|
+
import sns02 from '/public/images/footer/sns_02.webp';
|
|
21
|
+
import sns03 from '/public/images/footer/sns_03.webp';
|
|
22
|
+
import sns04 from '/public/images/footer/sns_04.webp';
|
|
23
|
+
import sns05 from '/public/images/footer/sns_05.webp';
|
|
24
|
+
const NewFooter = ({ groupsData, tel, logo, aceUrl }) => {
|
|
26
25
|
var _a;
|
|
27
26
|
const router = useRouter();
|
|
28
27
|
const mobile = require('is-mobile');
|
|
@@ -31,7 +30,7 @@ const Footer = ({ groupsData, tel, logoUrl, aceCountLink }) => {
|
|
|
31
30
|
const [isMobile, setIsMobile] = useState(false);
|
|
32
31
|
const [isOpen, setIsOpen] = useState(false);
|
|
33
32
|
const wrapperRef = useRef(null);
|
|
34
|
-
const routeLocation = router.asPath === '/'
|
|
33
|
+
const routeLocation = router.asPath === '/';
|
|
35
34
|
const fetchData = () => __awaiter(void 0, void 0, void 0, function* () {
|
|
36
35
|
try {
|
|
37
36
|
const req = yield fetch('/api/center/list');
|
|
@@ -46,7 +45,7 @@ const Footer = ({ groupsData, tel, logoUrl, aceCountLink }) => {
|
|
|
46
45
|
if (router.asPath !== '/') {
|
|
47
46
|
try {
|
|
48
47
|
const data = yield fetchData();
|
|
49
|
-
setIsGroups(data);
|
|
48
|
+
setIsGroups(data); // data를 setIsGroups로 설정
|
|
50
49
|
}
|
|
51
50
|
catch (error) {
|
|
52
51
|
console.error(`fetch groupsData useEffect error: ${error}`);
|
|
@@ -59,12 +58,12 @@ const Footer = ({ groupsData, tel, logoUrl, aceCountLink }) => {
|
|
|
59
58
|
insert('call', isMobile);
|
|
60
59
|
savePowerLinkConversion('call', isMobile);
|
|
61
60
|
if (isMobile) {
|
|
62
|
-
ace_mTelClick();
|
|
63
61
|
mTelClick();
|
|
62
|
+
ace_mTelClick();
|
|
64
63
|
}
|
|
65
64
|
else {
|
|
66
|
-
ace_pcTelClick();
|
|
67
65
|
pcTelClick();
|
|
66
|
+
ace_pcTelClick();
|
|
68
67
|
}
|
|
69
68
|
};
|
|
70
69
|
// GA 클릭이벤트
|
|
@@ -96,7 +95,7 @@ const Footer = ({ groupsData, tel, logoUrl, aceCountLink }) => {
|
|
|
96
95
|
const ace_pcTelClick = () => {
|
|
97
96
|
try {
|
|
98
97
|
// @ts-ignore
|
|
99
|
-
_PL(
|
|
98
|
+
_PL(aceUrl ? aceUrl : 'www.daeryunlaw.com/tel');
|
|
100
99
|
}
|
|
101
100
|
catch (e) { }
|
|
102
101
|
};
|
|
@@ -117,22 +116,22 @@ const Footer = ({ groupsData, tel, logoUrl, aceCountLink }) => {
|
|
|
117
116
|
useEffect(() => {
|
|
118
117
|
setIsMobile(mobile());
|
|
119
118
|
}, []);
|
|
120
|
-
return (<footer className={'relative flex h-[550px] w-full items-center justify-center border-t border-solid border-[#A8A8A8] bg-white font-[SUIT] text-[18px] ' +
|
|
119
|
+
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] ' +
|
|
121
120
|
'max-xs:h-[800px] ' +
|
|
122
121
|
'max-lg:mb-[70px] ' +
|
|
123
122
|
'max-2xs:h-[730px]'}>
|
|
124
123
|
{/*top button*/}
|
|
125
|
-
<Wrapper className={'!absolute top-0'}>
|
|
124
|
+
<Wrapper id={'footer'} className={'!absolute top-0'}>
|
|
126
125
|
<div className={'relative z-20'}>
|
|
127
126
|
<TopBtn className={'absolute right-0 top-[-50%] translate-y-[-50%]'}/>
|
|
128
127
|
</div>
|
|
129
128
|
</Wrapper>
|
|
130
|
-
<Wrapper>
|
|
129
|
+
<Wrapper id={'footer'}>
|
|
131
130
|
<div className={'w-full'}>
|
|
132
131
|
<div className={'mb-[77px] font-[800] tracking-[-0px] xs:flex xs:items-center ' +
|
|
133
132
|
'max-xl:mb-[50px] max-xl:justify-center max-xl:gap-[5%] '}>
|
|
134
133
|
<Link href={'/'}>
|
|
135
|
-
<Image src={
|
|
134
|
+
<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] '}/>
|
|
136
135
|
</Link>
|
|
137
136
|
|
|
138
137
|
<div className={'flex gap-[36px] max-xxl:gap-[20px] max-xl:hidden '}>
|
|
@@ -180,29 +179,30 @@ const Footer = ({ groupsData, tel, logoUrl, aceCountLink }) => {
|
|
|
180
179
|
</Link>
|
|
181
180
|
</li>))}
|
|
182
181
|
</>))
|
|
183
|
-
:
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
<
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
182
|
+
: (_a = isGroups.list) === null || _a === void 0 ? void 0 : _a.map((item, index) => (
|
|
183
|
+
// 메인페이지가 아닌 경로로 유입되었을 때, api 호출하여 받은 데이터. 색인 x
|
|
184
|
+
<>
|
|
185
|
+
<li key={index} value={item.code_name} className="cursor-pointer px-5 py-[5px] text-[17px] font-[500] duration-150 hover:bg-gray-100">
|
|
186
|
+
<Link href={getDomainHandler(item.code, item.code_desc)} key={index} target="_blank" title={item.code_name} onClick={() => {
|
|
187
|
+
setIsOpen(!isOpen);
|
|
188
|
+
}}>
|
|
189
|
+
{item.code === 'CT0000'
|
|
190
|
+
? item.code_name
|
|
191
|
+
: `${item.code_name} 그룹`}
|
|
192
|
+
</Link>
|
|
193
|
+
</li>
|
|
194
|
+
{item.children.length > 0 &&
|
|
195
|
+
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">
|
|
196
|
+
<Link href={childGroup.etc2} key={index} target="_blank" title={childGroup.codename} onClick={() => {
|
|
197
|
+
setIsOpen(!isOpen);
|
|
198
|
+
}}>
|
|
199
|
+
{childGroup.code_name} 센터
|
|
200
|
+
</Link>
|
|
201
|
+
</li>))}
|
|
202
|
+
</>))}
|
|
203
203
|
</ul>
|
|
204
204
|
|
|
205
|
-
<Image draggable={false} src={
|
|
205
|
+
<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]'}/>
|
|
206
206
|
</div>
|
|
207
207
|
</div>
|
|
208
208
|
</div>
|
|
@@ -215,7 +215,7 @@ const Footer = ({ groupsData, tel, logoUrl, aceCountLink }) => {
|
|
|
215
215
|
'max-xs:mb-[42px] max-xs:grid max-xs:grid-cols-2 max-xs:gap-2 max-xs:text-[16px] max-xs:leading-snug '}>
|
|
216
216
|
<FooterLinkList />
|
|
217
217
|
</div>
|
|
218
|
-
<div className={'mb-[15px] max-xl:justify-center max-md:text-[14px] max-xs:mb-[24px] max-xs:text-[16px] max-2xs:mb-[33px] xs:flex xs:w-
|
|
218
|
+
<div className={'mb-[15px] max-xl:justify-center max-md:text-[14px] max-xs:mb-[24px] max-xs:text-[16px] max-2xs:mb-[33px] xs:flex xs:w-full xs:items-center'}>
|
|
219
219
|
<p className={'xs:pr-[11px] xs:text-center'}>
|
|
220
220
|
<span className="font-[800]">주소</span>{' '}
|
|
221
221
|
<span className={'inline-block max-2xs:text-[14px]'}>
|
|
@@ -231,7 +231,7 @@ const Footer = ({ groupsData, tel, logoUrl, aceCountLink }) => {
|
|
|
231
231
|
|
|
232
232
|
<p className={'border-solid max-xs:my-[11px] xs:border-r xs:px-[11px] xs:text-center'}>
|
|
233
233
|
<span className="font-[800]">법률상담접수 </span>{' '}
|
|
234
|
-
<Link href={
|
|
234
|
+
<Link href={tel} onClick={onClickTel} aria-label={'법률상담접수 ' + tel} className={'inline-block'}>
|
|
235
235
|
<span className={'inline-block'}>{tel}</span>
|
|
236
236
|
</Link>
|
|
237
237
|
</p>
|
|
@@ -245,51 +245,61 @@ const Footer = ({ groupsData, tel, logoUrl, aceCountLink }) => {
|
|
|
245
245
|
</p>
|
|
246
246
|
<div className={'flex max-xl:justify-center max-xl:gap-1'}>
|
|
247
247
|
<Link href="https://www.scourt.go.kr/portal/information/events/search/search.jsp" target="_blank" rel="noopener noreferrer">
|
|
248
|
-
<Image src={
|
|
248
|
+
<Image src={sns01} alt="나의 사건 검색" width={66} height={66} className={snsClass}/>
|
|
249
249
|
</Link>
|
|
250
250
|
|
|
251
251
|
<Link href="https://blog.naver.com/lawfirmdaeryun" target="_blank" rel="noopener noreferrer">
|
|
252
|
-
<Image src={
|
|
252
|
+
<Image src={sns02} alt="법무법인(유한) 대륜 공식블로그" width={37} height={31} className={snsClass}/>
|
|
253
253
|
</Link>
|
|
254
254
|
|
|
255
255
|
<Link href="https://pf.kakao.com/_xgxoTlK/chat" target="_blank" rel="noopener noreferrer" onClick={() => {
|
|
256
256
|
insert('kakao', isMobile);
|
|
257
257
|
savePowerLinkConversion('kakao', isMobile);
|
|
258
|
-
ace_mKakaoClick();
|
|
259
258
|
mKakaoClick();
|
|
259
|
+
ace_mKakaoClick();
|
|
260
260
|
}}>
|
|
261
|
-
<Image src={
|
|
261
|
+
<Image src={sns03} alt="법무법인(유한) 대륜 카카오톡채널" width={66} height={66} className={snsClass}/>
|
|
262
262
|
</Link>
|
|
263
263
|
|
|
264
264
|
<Link href="https://www.youtube.com/channel/UC3uX0o1sFLj5eHdvZp2T64g/featured" target="_blank" rel="noopener noreferrer">
|
|
265
|
-
<Image draggable={false} src={
|
|
265
|
+
<Image draggable={false} src={sns04} alt="법무법인(유한) 대륜 유투브" width={66} height={66} className={snsClass}/>
|
|
266
266
|
</Link>
|
|
267
267
|
|
|
268
268
|
<Link href="https://www.instagram.com/daeryun_lawfirm/?utm_medium=copy_link" target="_blank" rel="noopener noreferrer">
|
|
269
|
-
<Image draggable={false} src={
|
|
269
|
+
<Image draggable={false} src={sns05} alt="법무법인(유한) 대륜 인스타그램" width={66} height={66} className={snsClass}/>
|
|
270
270
|
</Link>
|
|
271
271
|
</div>
|
|
272
272
|
</div>
|
|
273
273
|
</Wrapper>
|
|
274
274
|
</footer>);
|
|
275
275
|
};
|
|
276
|
-
export default
|
|
276
|
+
export default NewFooter;
|
|
277
277
|
const FooterLinkList = () => {
|
|
278
278
|
return (<>
|
|
279
279
|
<p>
|
|
280
|
-
<Link href={'/common/disclaimer'}
|
|
280
|
+
<Link href={'https://www.daeryunlaw.com/common/disclaimer'} target={'_blank'}>
|
|
281
|
+
면책공고
|
|
282
|
+
</Link>
|
|
281
283
|
</p>
|
|
282
284
|
<p>
|
|
283
|
-
<Link href={'/common/limited-liability'}
|
|
285
|
+
<Link href={'https://www.daeryunlaw.com/common/limited-liability'} target={'_blank'}>
|
|
286
|
+
유한책임
|
|
287
|
+
</Link>
|
|
284
288
|
</p>
|
|
285
289
|
<p>
|
|
286
|
-
<Link href={'/common/privacy-policy'}
|
|
290
|
+
<Link href={'https://www.daeryunlaw.com/common/privacy-policy'} target={'_blank'}>
|
|
291
|
+
개인정보처리방침
|
|
292
|
+
</Link>
|
|
287
293
|
</p>
|
|
288
294
|
<p>
|
|
289
|
-
<Link href={'/common/collect'}
|
|
295
|
+
<Link href={'https://www.daeryunlaw.com/common/collect'} target={'_blank'}>
|
|
296
|
+
이메일무단수집거부
|
|
297
|
+
</Link>
|
|
290
298
|
</p>
|
|
291
299
|
<p className={'text-[#285FA7]'}>
|
|
292
|
-
<Link href={'https://www.daeryunlaw.com/inquire'}
|
|
300
|
+
<Link href={'https://www.daeryunlaw.com/inquire'} target={'_blank'}>
|
|
301
|
+
고객만족센터
|
|
302
|
+
</Link>
|
|
293
303
|
</p>
|
|
294
304
|
</>);
|
|
295
305
|
};
|