@daeryun/dr_components 0.3.22 → 0.3.24

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 (27) hide show
  1. package/dist/components/page/Login/Login.jsx +5 -102
  2. package/dist/components/page/Login/Login.tsx +5 -142
  3. package/dist/components/page/Login/LoginComp/LoginContainer.d.ts +6 -0
  4. package/dist/components/page/Login/LoginComp/LoginContainer.jsx +112 -0
  5. package/dist/components/page/Login/LoginComp/LoginContainer.tsx +169 -0
  6. package/dist/components/page/Login/LoginComp/SignContainer.d.ts +27 -0
  7. package/dist/components/page/Login/LoginComp/SignContainer.jsx +623 -0
  8. package/dist/components/page/Login/LoginComp/SignContainer.tsx +963 -0
  9. package/dist/components/page/Login/Sign.jsx +5 -611
  10. package/dist/components/page/Login/Sign.tsx +5 -864
  11. package/dist/components/page/MyCase/MyCasePage.jsx +4 -2
  12. package/dist/components/page/MyCase/MyCasePage.tsx +4 -2
  13. package/dist/components/page/MyCase/[id]/MyCaseDetailPage.jsx +5 -75
  14. package/dist/components/page/MyCase/[id]/MyCaseDetailPage.tsx +5 -143
  15. package/dist/components/page/MyCase/[id]/_component/MyCaseDetailPageContainer.d.ts +5 -0
  16. package/dist/components/page/MyCase/[id]/_component/MyCaseDetailPageContainer.jsx +80 -0
  17. package/dist/components/page/MyCase/[id]/_component/MyCaseDetailPageContainer.tsx +153 -0
  18. package/dist/components/page/MyCase/[id]/_component/_caseInquiry/CaseInquiry.jsx +4 -2
  19. package/dist/components/page/MyCase/[id]/_component/_caseInquiry/CaseInquiry.tsx +4 -2
  20. package/dist/components/page/MyCase/_component/CaseContainer.jsx +99 -97
  21. package/dist/components/page/MyCase/_component/CaseContainer.tsx +32 -30
  22. package/dist/components/page/MyCase/_component/_table/CaseTable.jsx +18 -15
  23. package/dist/components/page/MyCase/_component/_table/CaseTable.tsx +18 -15
  24. package/dist/components/page/MyCase/_component/_table/CaseTableMo.jsx +5 -2
  25. package/dist/components/page/MyCase/_component/_table/CaseTableMo.tsx +5 -2
  26. package/dist/tsconfig.tsbuildinfo +1 -1
  27. package/package.json +1 -1
@@ -1,10 +1,6 @@
1
1
  'use client';
2
- import React, { useEffect } from 'react';
3
- import { usePathname, useSearchParams } from 'next/navigation';
4
- import Image from 'next/image';
5
- import PageWrapper from '../../Layout/PageWrapper';
6
- import { setCookie } from '../../../lib';
7
- import LoginBreadCrumb from './LoginComp/LoginBreadCrumb';
2
+ import React, { Suspense } from 'react';
3
+ import LoginContainer from './LoginComp/LoginContainer';
8
4
  const Login = ({ layoutClassName = ' relative h-[100vh] max-h-[1200px] min-h-[1000px] w-full overflow-hidden bg-white font-[SUIT] ' +
9
5
  ' max-3xl:max-h-[1080px] max-3xl:min-h-[1000px] ' +
10
6
  ' max-lg:min-h-[930px] ' +
@@ -12,101 +8,8 @@ const Login = ({ layoutClassName = ' relative h-[100vh] max-h-[1200px] min-h-[10
12
8
  ' mb-[192px] mt-[128px] ' +
13
9
  ' max-lg:mt-[112px] ' +
14
10
  ' max-sm:mt-[100px] ' }) => {
15
- const searchParam = useSearchParams();
16
- const pathName = usePathname();
17
- // const router = useRouter();
18
- const clientKey = process.env.NEXT_PUBLIC_OAUTH_CLIENT_KEY || '';
19
- const imagePath = process.env.NEXT_PUBLIC_S3_URL + '';
20
- const redirectWithNoReferrer = (url) => {
21
- const a = document.createElement('a');
22
- a.href = url;
23
- a.rel = 'noreferrer'; // Referrer 정보 제거
24
- a.click();
25
- };
26
- useEffect(() => {
27
- // const redirect = router.query.redirect;
28
- const redirect = searchParam.get('redirect') || '';
29
- if (redirect && typeof redirect === 'string') {
30
- setCookie({ key: 'redirect', value: redirect });
31
- }
32
- }, [pathName]);
33
- const handleLoginClick = (type) => {
34
- const loginUrl = `https://oauth.daeryunlaw.com/login/${type}?clientKey=${clientKey}&${process.env.NODE_ENV === 'production' ? 'state=sapa' : ''}`;
35
- redirectWithNoReferrer(loginUrl);
36
- };
37
- const loginProvider = [
38
- {
39
- identityProvider: 'kakao',
40
- name: '카카오',
41
- positionClass: ' top-[22px] left-[26px] max-lg:top-[20px] max-lg:left-[24px] max-sm:top-[14px] max-sm:left-[20px] ',
42
- textColor: '#000000',
43
- bgColor: '#FEE502',
44
- iconClassName: `w-[28px] h-[28px] max-lg:w-[24px] max-lg:h-[24px] max-sm:w-[20px] max-sm:h-[20px] `
45
- },
46
- {
47
- identityProvider: 'naver',
48
- name: '네이버',
49
- positionClass: ' top-[25px] left-[28px] max-lg:top-[22px] max-lg:left-[26px] max-sm:top-[15px] max-sm:left-[21.5px] ',
50
- textColor: '#FFFFFF',
51
- bgColor: '#02C75A',
52
- iconClassName: `w-[28px] h-[28px] max-lg:w-[20px] max-lg:h-[20px] max-sm:w-[17px] max-sm:h-[18px] `
53
- },
54
- {
55
- identityProvider: 'google',
56
- name: '구글',
57
- positionClass: ' top-[22.73px] left-[27px] max-lg:top-[20.78px] max-lg:left-[26.19px] max-sm:top-[14px] max-sm:left-[21.46px] ',
58
- textColor: '#000000',
59
- bgColor: '#FFFFFF',
60
- className: 'border-[1px] border-solid border-[#707070] ',
61
- iconClassName: `w-[24px] h-[24px] max-lg:w-[22px] max-lg:h-[22.45px] max-sm:w-[19.16px] max-sm:h-[19.55px] `
62
- },
63
- {
64
- identityProvider: 'apple',
65
- name: 'Apple',
66
- positionClass: ' top-[19px] left-[27px] max-lg:top-[17px] max-lg:left-[25px] max-sm:top-[11px] max-sm:left-[20.42px] ',
67
- textColor: '#FFFFFF',
68
- bgColor: '#050708',
69
- iconClassName: `w-[26px] h-[30.87px] max-lg:w-[22px] max-lg:h-[26.12px] max-sm:w-[19.16px] max-sm:h-[22.75px] `
70
- }
71
- ];
72
- return (<section className={layoutClassName}>
73
- <PageWrapper>
74
- <div>
75
- <div className={'flex flex-row-reverse pt-[47px] ' + 'max-lg:pt-[40px]' + ' max-sm:pt-[28px] '}>
76
- <LoginBreadCrumb breadList={['로그인', '간편 로그인']}/>
77
- </div>
78
- </div>
79
- <div className={'mt-[45px]' + ' max-lg:mt-[68px] ' + ' max-sm:mt-[44px] '}>
80
- <div className={'flex flex-col'}>
81
- <div className={' title_large text-[#000000] ' + ' max-lg:title_large_tb ' + ' max-sm:title_large_mo '}>
82
- 간편 로그인
83
- </div>
84
- </div>
85
- <div className={' body_large2 mt-[12px] text-[#000000] ' +
86
- ' max-lg:title_small_tb max-lg:mt-[12px] ' +
87
- ' max-sm:label_medium2_tb max-sm:mt-[8px] '}>
88
- SNS 간편 가입으로 쉽고 빠른 로그인이 가능합니다.
89
- <br />
90
- 로그인하고 나의 사건 진행 상황을 확인하세요!
91
- </div>
92
- </div>
93
- <div className={' mt-[154px] flex flex-col items-center justify-center gap-[20px]' +
94
- ' max-lg:mt-[168px] ' +
95
- ' max-sm:mt-[80px] '}>
96
- {loginProvider.map((item, index) => {
97
- return (<button key={index} type="button" onClick={() => handleLoginClick(item.identityProvider)} className={' relative flex h-[72px] w-[540px] items-center ' +
98
- ' body_large2 justify-center rounded-[36px] ' +
99
- ' max-lg:body_large2_tb max-lg:h-[64px] max-lg:w-[500px] ' +
100
- ' max-sm:body_large2_mo max-sm:h-[48px] max-sm:w-[320px] ' +
101
- ` ${item.className} `} style={{ color: item.textColor, backgroundColor: item.bgColor }}>
102
- <span className={`${item.positionClass} absolute ${item.iconClassName}`}>
103
- <Image src={`${imagePath}/common-login/${item.identityProvider}.svg`} alt={item.identityProvider} height={100} width={100} className={`h-full w-full`}/>
104
- </span>
105
- <span>{`${item.name} 계정으로 로그인`}</span>
106
- </button>);
107
- })}
108
- </div>
109
- </PageWrapper>
110
- </section>);
11
+ return (<Suspense>
12
+ <LoginContainer layoutClassName={layoutClassName}/>
13
+ </Suspense>);
111
14
  };
112
15
  export default Login;
@@ -1,11 +1,12 @@
1
1
  'use client';
2
2
 
3
- import React, { useEffect } from 'react';
3
+ import React, { Suspense, useEffect } from 'react';
4
4
  import { usePathname, useSearchParams } from 'next/navigation';
5
5
  import Image from 'next/image';
6
6
  import PageWrapper from '../../Layout/PageWrapper';
7
7
  import { setCookie } from '../../../lib';
8
8
  import LoginBreadCrumb from './LoginComp/LoginBreadCrumb';
9
+ import LoginContainer from './LoginComp/LoginContainer';
9
10
 
10
11
  interface props {
11
12
  layoutClassName?: string; // 높이 및 마진값 조절
@@ -19,148 +20,10 @@ const Login = ({
19
20
  ' max-lg:mt-[112px] ' +
20
21
  ' max-sm:mt-[100px] '
21
22
  }: props) => {
22
- const searchParam = useSearchParams();
23
- const pathName = usePathname();
24
- // const router = useRouter();
25
- const clientKey = process.env.NEXT_PUBLIC_OAUTH_CLIENT_KEY || '';
26
- const imagePath: string = process.env.NEXT_PUBLIC_S3_URL + '';
27
- const redirectWithNoReferrer = (url: string) => {
28
- const a = document.createElement('a');
29
- a.href = url;
30
- a.rel = 'noreferrer'; // Referrer 정보 제거
31
- a.click();
32
- };
33
-
34
- useEffect(() => {
35
- // const redirect = router.query.redirect;
36
- const redirect = searchParam.get('redirect') || '';
37
-
38
- if (redirect && typeof redirect === 'string') {
39
- setCookie({ key: 'redirect', value: redirect });
40
- }
41
- }, [pathName]);
42
-
43
- const handleLoginClick = (type: string) => {
44
- const loginUrl = `https://oauth.daeryunlaw.com/login/${type}?clientKey=${clientKey}&${process.env.NODE_ENV === 'production' ? 'state=sapa' : ''}`;
45
- redirectWithNoReferrer(loginUrl);
46
- };
47
-
48
- const loginProvider: {
49
- identityProvider: 'kakao' | 'google' | 'naver' | 'apple';
50
- name: string;
51
- positionClass: string;
52
- textColor: string;
53
- bgColor: string;
54
- className?: string;
55
- iconClassName?: string;
56
- }[] = [
57
- {
58
- identityProvider: 'kakao',
59
- name: '카카오',
60
- positionClass:
61
- ' top-[22px] left-[26px] max-lg:top-[20px] max-lg:left-[24px] max-sm:top-[14px] max-sm:left-[20px] ',
62
- textColor: '#000000',
63
- bgColor: '#FEE502',
64
- iconClassName: `w-[28px] h-[28px] max-lg:w-[24px] max-lg:h-[24px] max-sm:w-[20px] max-sm:h-[20px] `
65
- },
66
- {
67
- identityProvider: 'naver',
68
- name: '네이버',
69
- positionClass:
70
- ' top-[25px] left-[28px] max-lg:top-[22px] max-lg:left-[26px] max-sm:top-[15px] max-sm:left-[21.5px] ',
71
- textColor: '#FFFFFF',
72
- bgColor: '#02C75A',
73
- iconClassName: `w-[28px] h-[28px] max-lg:w-[20px] max-lg:h-[20px] max-sm:w-[17px] max-sm:h-[18px] `
74
- },
75
- {
76
- identityProvider: 'google',
77
- name: '구글',
78
- positionClass:
79
- ' top-[22.73px] left-[27px] max-lg:top-[20.78px] max-lg:left-[26.19px] max-sm:top-[14px] max-sm:left-[21.46px] ',
80
- textColor: '#000000',
81
- bgColor: '#FFFFFF',
82
- className: 'border-[1px] border-solid border-[#707070] ',
83
- iconClassName: `w-[24px] h-[24px] max-lg:w-[22px] max-lg:h-[22.45px] max-sm:w-[19.16px] max-sm:h-[19.55px] `
84
- },
85
- {
86
- identityProvider: 'apple',
87
- name: 'Apple',
88
- positionClass:
89
- ' top-[19px] left-[27px] max-lg:top-[17px] max-lg:left-[25px] max-sm:top-[11px] max-sm:left-[20.42px] ',
90
- textColor: '#FFFFFF',
91
- bgColor: '#050708',
92
- iconClassName: `w-[26px] h-[30.87px] max-lg:w-[22px] max-lg:h-[26.12px] max-sm:w-[19.16px] max-sm:h-[22.75px] `
93
- }
94
- ];
95
-
96
23
  return (
97
- <section className={layoutClassName}>
98
- <PageWrapper>
99
- <div>
100
- <div className={'flex flex-row-reverse pt-[47px] ' + 'max-lg:pt-[40px]' + ' max-sm:pt-[28px] '}>
101
- <LoginBreadCrumb breadList={['로그인', '간편 로그인']} />
102
- </div>
103
- </div>
104
- <div className={'mt-[45px]' + ' max-lg:mt-[68px] ' + ' max-sm:mt-[44px] '}>
105
- <div className={'flex flex-col'}>
106
- <div
107
- className={
108
- ' title_large text-[#000000] ' + ' max-lg:title_large_tb ' + ' max-sm:title_large_mo '
109
- }
110
- >
111
- 간편 로그인
112
- </div>
113
- </div>
114
- <div
115
- className={
116
- ' body_large2 mt-[12px] text-[#000000] ' +
117
- ' max-lg:title_small_tb max-lg:mt-[12px] ' +
118
- ' max-sm:label_medium2_tb max-sm:mt-[8px] '
119
- }
120
- >
121
- SNS 간편 가입으로 쉽고 빠른 로그인이 가능합니다.
122
- <br />
123
- 로그인하고 나의 사건 진행 상황을 확인하세요!
124
- </div>
125
- </div>
126
- <div
127
- className={
128
- ' mt-[154px] flex flex-col items-center justify-center gap-[20px]' +
129
- ' max-lg:mt-[168px] ' +
130
- ' max-sm:mt-[80px] '
131
- }
132
- >
133
- {loginProvider.map((item, index: number) => {
134
- return (
135
- <button
136
- key={index}
137
- type="button"
138
- onClick={() => handleLoginClick(item.identityProvider)}
139
- className={
140
- ' relative flex h-[72px] w-[540px] items-center ' +
141
- ' body_large2 justify-center rounded-[36px] ' +
142
- ' max-lg:body_large2_tb max-lg:h-[64px] max-lg:w-[500px] ' +
143
- ' max-sm:body_large2_mo max-sm:h-[48px] max-sm:w-[320px] ' +
144
- ` ${item.className} `
145
- }
146
- style={{ color: item.textColor, backgroundColor: item.bgColor }}
147
- >
148
- <span className={`${item.positionClass} absolute ${item.iconClassName}`}>
149
- <Image
150
- src={`${imagePath}/common-login/${item.identityProvider}.svg`}
151
- alt={item.identityProvider}
152
- height={100}
153
- width={100}
154
- className={`h-full w-full`}
155
- />
156
- </span>
157
- <span>{`${item.name} 계정으로 로그인`}</span>
158
- </button>
159
- );
160
- })}
161
- </div>
162
- </PageWrapper>
163
- </section>
24
+ <Suspense>
25
+ <LoginContainer layoutClassName={layoutClassName} />
26
+ </Suspense>
164
27
  );
165
28
  };
166
29
 
@@ -0,0 +1,6 @@
1
+ import React from 'react';
2
+ interface props {
3
+ layoutClassName?: string;
4
+ }
5
+ declare const LoginContainer: ({ layoutClassName }: props) => React.JSX.Element;
6
+ export default LoginContainer;
@@ -0,0 +1,112 @@
1
+ 'use client';
2
+ import React, { useEffect } from 'react';
3
+ import { usePathname, useSearchParams } from 'next/navigation';
4
+ import Image from 'next/image';
5
+ import PageWrapper from '../../../Layout/PageWrapper';
6
+ import { setCookie } from '../../../../lib';
7
+ import LoginBreadCrumb from './LoginBreadCrumb';
8
+ const LoginContainer = ({ layoutClassName = ' relative h-[100vh] max-h-[1200px] min-h-[1000px] w-full overflow-hidden bg-white font-[SUIT] ' +
9
+ ' max-3xl:max-h-[1080px] max-3xl:min-h-[1000px] ' +
10
+ ' max-lg:min-h-[930px] ' +
11
+ ' max-md:max-h-[800px] max-md:min-h-[1100px] ' +
12
+ ' mb-[192px] mt-[128px] ' +
13
+ ' max-lg:mt-[112px] ' +
14
+ ' max-sm:mt-[100px] ' }) => {
15
+ const searchParam = useSearchParams();
16
+ const pathName = usePathname();
17
+ // const router = useRouter();
18
+ const clientKey = process.env.NEXT_PUBLIC_OAUTH_CLIENT_KEY || '';
19
+ const imagePath = process.env.NEXT_PUBLIC_S3_URL + '';
20
+ const redirectWithNoReferrer = (url) => {
21
+ const a = document.createElement('a');
22
+ a.href = url;
23
+ a.rel = 'noreferrer'; // Referrer 정보 제거
24
+ a.click();
25
+ };
26
+ useEffect(() => {
27
+ // const redirect = router.query.redirect;
28
+ const redirect = searchParam.get('redirect') || '';
29
+ if (redirect && typeof redirect === 'string') {
30
+ setCookie({ key: 'redirect', value: redirect });
31
+ }
32
+ }, [pathName]);
33
+ const handleLoginClick = (type) => {
34
+ const loginUrl = `https://oauth.daeryunlaw.com/login/${type}?clientKey=${clientKey}&${process.env.NODE_ENV === 'production' ? 'state=sapa' : ''}`;
35
+ redirectWithNoReferrer(loginUrl);
36
+ };
37
+ const loginProvider = [
38
+ {
39
+ identityProvider: 'kakao',
40
+ name: '카카오',
41
+ positionClass: ' top-[22px] left-[26px] max-lg:top-[20px] max-lg:left-[24px] max-sm:top-[14px] max-sm:left-[20px] ',
42
+ textColor: '#000000',
43
+ bgColor: '#FEE502',
44
+ iconClassName: `w-[28px] h-[28px] max-lg:w-[24px] max-lg:h-[24px] max-sm:w-[20px] max-sm:h-[20px] `
45
+ },
46
+ {
47
+ identityProvider: 'naver',
48
+ name: '네이버',
49
+ positionClass: ' top-[25px] left-[28px] max-lg:top-[22px] max-lg:left-[26px] max-sm:top-[15px] max-sm:left-[21.5px] ',
50
+ textColor: '#FFFFFF',
51
+ bgColor: '#02C75A',
52
+ iconClassName: `w-[28px] h-[28px] max-lg:w-[20px] max-lg:h-[20px] max-sm:w-[17px] max-sm:h-[18px] `
53
+ },
54
+ {
55
+ identityProvider: 'google',
56
+ name: '구글',
57
+ positionClass: ' top-[22.73px] left-[27px] max-lg:top-[20.78px] max-lg:left-[26.19px] max-sm:top-[14px] max-sm:left-[21.46px] ',
58
+ textColor: '#000000',
59
+ bgColor: '#FFFFFF',
60
+ className: 'border-[1px] border-solid border-[#707070] ',
61
+ iconClassName: `w-[24px] h-[24px] max-lg:w-[22px] max-lg:h-[22.45px] max-sm:w-[19.16px] max-sm:h-[19.55px] `
62
+ },
63
+ {
64
+ identityProvider: 'apple',
65
+ name: 'Apple',
66
+ positionClass: ' top-[19px] left-[27px] max-lg:top-[17px] max-lg:left-[25px] max-sm:top-[11px] max-sm:left-[20.42px] ',
67
+ textColor: '#FFFFFF',
68
+ bgColor: '#050708',
69
+ iconClassName: `w-[26px] h-[30.87px] max-lg:w-[22px] max-lg:h-[26.12px] max-sm:w-[19.16px] max-sm:h-[22.75px] `
70
+ }
71
+ ];
72
+ return (<section className={layoutClassName}>
73
+ <PageWrapper>
74
+ <div>
75
+ <div className={'flex flex-row-reverse pt-[47px] ' + 'max-lg:pt-[40px]' + ' max-sm:pt-[28px] '}>
76
+ <LoginBreadCrumb breadList={['로그인', '간편 로그인']}/>
77
+ </div>
78
+ </div>
79
+ <div className={'mt-[45px]' + ' max-lg:mt-[68px] ' + ' max-sm:mt-[44px] '}>
80
+ <div className={'flex flex-col'}>
81
+ <div className={' title_large text-[#000000] ' + ' max-lg:title_large_tb ' + ' max-sm:title_large_mo '}>
82
+ 간편 로그인
83
+ </div>
84
+ </div>
85
+ <div className={' body_large2 mt-[12px] text-[#000000] ' +
86
+ ' max-lg:title_small_tb max-lg:mt-[12px] ' +
87
+ ' max-sm:label_medium2_tb max-sm:mt-[8px] '}>
88
+ SNS 간편 가입으로 쉽고 빠른 로그인이 가능합니다.
89
+ <br />
90
+ 로그인하고 나의 사건 진행 상황을 확인하세요!
91
+ </div>
92
+ </div>
93
+ <div className={' mt-[154px] flex flex-col items-center justify-center gap-[20px]' +
94
+ ' max-lg:mt-[168px] ' +
95
+ ' max-sm:mt-[80px] '}>
96
+ {loginProvider.map((item, index) => {
97
+ return (<button key={index} type="button" onClick={() => handleLoginClick(item.identityProvider)} className={' relative flex h-[72px] w-[540px] items-center ' +
98
+ ' body_large2 justify-center rounded-[36px] ' +
99
+ ' max-lg:body_large2_tb max-lg:h-[64px] max-lg:w-[500px] ' +
100
+ ' max-sm:body_large2_mo max-sm:h-[48px] max-sm:w-[320px] ' +
101
+ ` ${item.className} `} style={{ color: item.textColor, backgroundColor: item.bgColor }}>
102
+ <span className={`${item.positionClass} absolute ${item.iconClassName}`}>
103
+ <Image src={`${imagePath}/common-login/${item.identityProvider}.svg`} alt={item.identityProvider} height={100} width={100} className={`h-full w-full`}/>
104
+ </span>
105
+ <span>{`${item.name} 계정으로 로그인`}</span>
106
+ </button>);
107
+ })}
108
+ </div>
109
+ </PageWrapper>
110
+ </section>);
111
+ };
112
+ export default LoginContainer;
@@ -0,0 +1,169 @@
1
+ 'use client';
2
+
3
+ import React, { useEffect } from 'react';
4
+ import { usePathname, useSearchParams } from 'next/navigation';
5
+ import Image from 'next/image';
6
+ import PageWrapper from '../../../Layout/PageWrapper';
7
+ import { setCookie } from '../../../../lib';
8
+ import LoginBreadCrumb from './LoginBreadCrumb';
9
+
10
+ interface props {
11
+ layoutClassName?: string; // 높이 및 마진값 조절
12
+ }
13
+ const LoginContainer = ({
14
+ layoutClassName = ' relative h-[100vh] max-h-[1200px] min-h-[1000px] w-full overflow-hidden bg-white font-[SUIT] ' +
15
+ ' max-3xl:max-h-[1080px] max-3xl:min-h-[1000px] ' +
16
+ ' max-lg:min-h-[930px] ' +
17
+ ' max-md:max-h-[800px] max-md:min-h-[1100px] ' +
18
+ ' mb-[192px] mt-[128px] ' +
19
+ ' max-lg:mt-[112px] ' +
20
+ ' max-sm:mt-[100px] '
21
+ }: props) => {
22
+ const searchParam = useSearchParams();
23
+ const pathName = usePathname();
24
+ // const router = useRouter();
25
+ const clientKey = process.env.NEXT_PUBLIC_OAUTH_CLIENT_KEY || '';
26
+ const imagePath: string = process.env.NEXT_PUBLIC_S3_URL + '';
27
+ const redirectWithNoReferrer = (url: string) => {
28
+ const a = document.createElement('a');
29
+ a.href = url;
30
+ a.rel = 'noreferrer'; // Referrer 정보 제거
31
+ a.click();
32
+ };
33
+
34
+ useEffect(() => {
35
+ // const redirect = router.query.redirect;
36
+ const redirect = searchParam.get('redirect') || '';
37
+
38
+ if (redirect && typeof redirect === 'string') {
39
+ setCookie({ key: 'redirect', value: redirect });
40
+ }
41
+ }, [pathName]);
42
+
43
+ const handleLoginClick = (type: string) => {
44
+ const loginUrl = `https://oauth.daeryunlaw.com/login/${type}?clientKey=${clientKey}&${
45
+ process.env.NODE_ENV === 'production' ? 'state=sapa' : ''
46
+ }`;
47
+ redirectWithNoReferrer(loginUrl);
48
+ };
49
+
50
+ const loginProvider: {
51
+ identityProvider: 'kakao' | 'google' | 'naver' | 'apple';
52
+ name: string;
53
+ positionClass: string;
54
+ textColor: string;
55
+ bgColor: string;
56
+ className?: string;
57
+ iconClassName?: string;
58
+ }[] = [
59
+ {
60
+ identityProvider: 'kakao',
61
+ name: '카카오',
62
+ positionClass:
63
+ ' top-[22px] left-[26px] max-lg:top-[20px] max-lg:left-[24px] max-sm:top-[14px] max-sm:left-[20px] ',
64
+ textColor: '#000000',
65
+ bgColor: '#FEE502',
66
+ iconClassName: `w-[28px] h-[28px] max-lg:w-[24px] max-lg:h-[24px] max-sm:w-[20px] max-sm:h-[20px] `
67
+ },
68
+ {
69
+ identityProvider: 'naver',
70
+ name: '네이버',
71
+ positionClass:
72
+ ' top-[25px] left-[28px] max-lg:top-[22px] max-lg:left-[26px] max-sm:top-[15px] max-sm:left-[21.5px] ',
73
+ textColor: '#FFFFFF',
74
+ bgColor: '#02C75A',
75
+ iconClassName: `w-[28px] h-[28px] max-lg:w-[20px] max-lg:h-[20px] max-sm:w-[17px] max-sm:h-[18px] `
76
+ },
77
+ {
78
+ identityProvider: 'google',
79
+ name: '구글',
80
+ positionClass:
81
+ ' top-[22.73px] left-[27px] max-lg:top-[20.78px] max-lg:left-[26.19px] max-sm:top-[14px] max-sm:left-[21.46px] ',
82
+ textColor: '#000000',
83
+ bgColor: '#FFFFFF',
84
+ className: 'border-[1px] border-solid border-[#707070] ',
85
+ iconClassName: `w-[24px] h-[24px] max-lg:w-[22px] max-lg:h-[22.45px] max-sm:w-[19.16px] max-sm:h-[19.55px] `
86
+ },
87
+ {
88
+ identityProvider: 'apple',
89
+ name: 'Apple',
90
+ positionClass:
91
+ ' top-[19px] left-[27px] max-lg:top-[17px] max-lg:left-[25px] max-sm:top-[11px] max-sm:left-[20.42px] ',
92
+ textColor: '#FFFFFF',
93
+ bgColor: '#050708',
94
+ iconClassName: `w-[26px] h-[30.87px] max-lg:w-[22px] max-lg:h-[26.12px] max-sm:w-[19.16px] max-sm:h-[22.75px] `
95
+ }
96
+ ];
97
+
98
+ return (
99
+ <section className={layoutClassName}>
100
+ <PageWrapper>
101
+ <div>
102
+ <div className={'flex flex-row-reverse pt-[47px] ' + 'max-lg:pt-[40px]' + ' max-sm:pt-[28px] '}>
103
+ <LoginBreadCrumb breadList={['로그인', '간편 로그인']} />
104
+ </div>
105
+ </div>
106
+ <div className={'mt-[45px]' + ' max-lg:mt-[68px] ' + ' max-sm:mt-[44px] '}>
107
+ <div className={'flex flex-col'}>
108
+ <div
109
+ className={
110
+ ' title_large text-[#000000] ' + ' max-lg:title_large_tb ' + ' max-sm:title_large_mo '
111
+ }
112
+ >
113
+ 간편 로그인
114
+ </div>
115
+ </div>
116
+ <div
117
+ className={
118
+ ' body_large2 mt-[12px] text-[#000000] ' +
119
+ ' max-lg:title_small_tb max-lg:mt-[12px] ' +
120
+ ' max-sm:label_medium2_tb max-sm:mt-[8px] '
121
+ }
122
+ >
123
+ SNS 간편 가입으로 쉽고 빠른 로그인이 가능합니다.
124
+ <br />
125
+ 로그인하고 나의 사건 진행 상황을 확인하세요!
126
+ </div>
127
+ </div>
128
+ <div
129
+ className={
130
+ ' mt-[154px] flex flex-col items-center justify-center gap-[20px]' +
131
+ ' max-lg:mt-[168px] ' +
132
+ ' max-sm:mt-[80px] '
133
+ }
134
+ >
135
+ {loginProvider.map((item, index: number) => {
136
+ return (
137
+ <button
138
+ key={index}
139
+ type="button"
140
+ onClick={() => handleLoginClick(item.identityProvider)}
141
+ className={
142
+ ' relative flex h-[72px] w-[540px] items-center ' +
143
+ ' body_large2 justify-center rounded-[36px] ' +
144
+ ' max-lg:body_large2_tb max-lg:h-[64px] max-lg:w-[500px] ' +
145
+ ' max-sm:body_large2_mo max-sm:h-[48px] max-sm:w-[320px] ' +
146
+ ` ${item.className} `
147
+ }
148
+ style={{ color: item.textColor, backgroundColor: item.bgColor }}
149
+ >
150
+ <span className={`${item.positionClass} absolute ${item.iconClassName}`}>
151
+ <Image
152
+ src={`${imagePath}/common-login/${item.identityProvider}.svg`}
153
+ alt={item.identityProvider}
154
+ height={100}
155
+ width={100}
156
+ className={`h-full w-full`}
157
+ />
158
+ </span>
159
+ <span>{`${item.name} 계정으로 로그인`}</span>
160
+ </button>
161
+ );
162
+ })}
163
+ </div>
164
+ </PageWrapper>
165
+ </section>
166
+ );
167
+ };
168
+
169
+ export default LoginContainer;
@@ -0,0 +1,27 @@
1
+ import React from 'react';
2
+ import { RecoilState } from 'recoil';
3
+ export interface IOptionalCheckItem {
4
+ title: string;
5
+ checked: boolean;
6
+ name: string;
7
+ isContent: boolean;
8
+ cautionTitle: string;
9
+ alarmTypeList: IOptionalCheckAlarm[];
10
+ }
11
+ export interface IOptionalCheckAlarm {
12
+ title: string;
13
+ checked: boolean;
14
+ name: string;
15
+ value: number;
16
+ }
17
+ type props = {
18
+ layoutClassName?: string;
19
+ session_key?: string;
20
+ loginInfoAtom: RecoilState<{
21
+ email: string;
22
+ name: string;
23
+ isLogin: boolean;
24
+ }>;
25
+ };
26
+ declare const SignContainer: ({ layoutClassName, session_key, loginInfoAtom }: props) => React.JSX.Element;
27
+ export default SignContainer;