@daeryun/dr_components 0.3.23 → 0.3.25

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 (29) hide show
  1. package/dist/components/page/Login/Login.jsx +3 -104
  2. package/dist/components/page/Login/Login.tsx +3 -148
  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 +3 -617
  10. package/dist/components/page/Login/Sign.tsx +2 -875
  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 +3 -75
  14. package/dist/components/page/MyCase/[id]/MyCaseDetailPage.tsx +2 -142
  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/_breadCrumble/CategoryMenu.jsx +5 -2
  21. package/dist/components/page/MyCase/_component/_breadCrumble/CategoryMenu.tsx +5 -3
  22. package/dist/components/page/MyCase/_component/_pagination/PaginationComponent.jsx +8 -10
  23. package/dist/components/page/MyCase/_component/_pagination/PaginationComponent.tsx +29 -35
  24. package/dist/components/page/MyCase/_component/_table/CaseTable.jsx +18 -15
  25. package/dist/components/page/MyCase/_component/_table/CaseTable.tsx +18 -15
  26. package/dist/components/page/MyCase/_component/_table/CaseTableMo.jsx +5 -2
  27. package/dist/components/page/MyCase/_component/_table/CaseTableMo.tsx +5 -2
  28. package/dist/tsconfig.tsbuildinfo +1 -1
  29. package/package.json +1 -1
@@ -1,10 +1,6 @@
1
1
  'use client';
2
- import React, { useEffect, Suspense } 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,105 +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
11
  return (<Suspense>
73
- <section className={layoutClassName}>
74
- <PageWrapper>
75
- <div>
76
- <div className={'flex flex-row-reverse pt-[47px] ' + 'max-lg:pt-[40px]' + ' max-sm:pt-[28px] '}>
77
- <LoginBreadCrumb breadList={['로그인', '간편 로그인']}/>
78
- </div>
79
- </div>
80
- <div className={'mt-[45px]' + ' max-lg:mt-[68px] ' + ' max-sm:mt-[44px] '}>
81
- <div className={'flex flex-col'}>
82
- <div className={' title_large text-[#000000] ' +
83
- ' max-lg:title_large_tb ' +
84
- ' max-sm:title_large_mo '}>
85
- 간편 로그인
86
- </div>
87
- </div>
88
- <div className={' body_large2 mt-[12px] text-[#000000] ' +
89
- ' max-lg:title_small_tb max-lg:mt-[12px] ' +
90
- ' max-sm:label_medium2_tb max-sm:mt-[8px] '}>
91
- SNS 간편 가입으로 쉽고 빠른 로그인이 가능합니다.
92
- <br />
93
- 로그인하고 나의 사건 진행 상황을 확인하세요!
94
- </div>
95
- </div>
96
- <div className={' mt-[154px] flex flex-col items-center justify-center gap-[20px]' +
97
- ' max-lg:mt-[168px] ' +
98
- ' max-sm:mt-[80px] '}>
99
- {loginProvider.map((item, index) => {
100
- return (<button key={index} type="button" onClick={() => handleLoginClick(item.identityProvider)} className={' relative flex h-[72px] w-[540px] items-center ' +
101
- ' body_large2 justify-center rounded-[36px] ' +
102
- ' max-lg:body_large2_tb max-lg:h-[64px] max-lg:w-[500px] ' +
103
- ' max-sm:body_large2_mo max-sm:h-[48px] max-sm:w-[320px] ' +
104
- ` ${item.className} `} style={{ color: item.textColor, backgroundColor: item.bgColor }}>
105
- <span className={`${item.positionClass} absolute ${item.iconClassName}`}>
106
- <Image src={`${imagePath}/common-login/${item.identityProvider}.svg`} alt={item.identityProvider} height={100} width={100} className={`h-full w-full`}/>
107
- </span>
108
- <span>{`${item.name} 계정으로 로그인`}</span>
109
- </button>);
110
- })}
111
- </div>
112
- </PageWrapper>
113
- </section>
12
+ <LoginContainer layoutClassName={layoutClassName}/>
114
13
  </Suspense>);
115
14
  };
116
15
  export default Login;
@@ -1,11 +1,12 @@
1
1
  'use client';
2
2
 
3
- import React, { useEffect, Suspense } 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,155 +20,9 @@ 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}&${
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
23
  return (
99
24
  <Suspense>
100
- <section className={layoutClassName}>
101
- <PageWrapper>
102
- <div>
103
- <div
104
- className={'flex flex-row-reverse pt-[47px] ' + 'max-lg:pt-[40px]' + ' max-sm:pt-[28px] '}
105
- >
106
- <LoginBreadCrumb breadList={['로그인', '간편 로그인']} />
107
- </div>
108
- </div>
109
- <div className={'mt-[45px]' + ' max-lg:mt-[68px] ' + ' max-sm:mt-[44px] '}>
110
- <div className={'flex flex-col'}>
111
- <div
112
- className={
113
- ' title_large text-[#000000] ' +
114
- ' max-lg:title_large_tb ' +
115
- ' max-sm:title_large_mo '
116
- }
117
- >
118
- 간편 로그인
119
- </div>
120
- </div>
121
- <div
122
- className={
123
- ' body_large2 mt-[12px] text-[#000000] ' +
124
- ' max-lg:title_small_tb max-lg:mt-[12px] ' +
125
- ' max-sm:label_medium2_tb max-sm:mt-[8px] '
126
- }
127
- >
128
- SNS 간편 가입으로 쉽고 빠른 로그인이 가능합니다.
129
- <br />
130
- 로그인하고 나의 사건 진행 상황을 확인하세요!
131
- </div>
132
- </div>
133
- <div
134
- className={
135
- ' mt-[154px] flex flex-col items-center justify-center gap-[20px]' +
136
- ' max-lg:mt-[168px] ' +
137
- ' max-sm:mt-[80px] '
138
- }
139
- >
140
- {loginProvider.map((item, index: number) => {
141
- return (
142
- <button
143
- key={index}
144
- type="button"
145
- onClick={() => handleLoginClick(item.identityProvider)}
146
- className={
147
- ' relative flex h-[72px] w-[540px] items-center ' +
148
- ' body_large2 justify-center rounded-[36px] ' +
149
- ' max-lg:body_large2_tb max-lg:h-[64px] max-lg:w-[500px] ' +
150
- ' max-sm:body_large2_mo max-sm:h-[48px] max-sm:w-[320px] ' +
151
- ` ${item.className} `
152
- }
153
- style={{ color: item.textColor, backgroundColor: item.bgColor }}
154
- >
155
- <span className={`${item.positionClass} absolute ${item.iconClassName}`}>
156
- <Image
157
- src={`${imagePath}/common-login/${item.identityProvider}.svg`}
158
- alt={item.identityProvider}
159
- height={100}
160
- width={100}
161
- className={`h-full w-full`}
162
- />
163
- </span>
164
- <span>{`${item.name} 계정으로 로그인`}</span>
165
- </button>
166
- );
167
- })}
168
- </div>
169
- </PageWrapper>
170
- </section>
25
+ <LoginContainer layoutClassName={layoutClassName} />
171
26
  </Suspense>
172
27
  );
173
28
  };
@@ -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;