@daeryun/dr_components 0.3.89 → 0.3.91
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/cjs/tsconfig-cjs.tsbuildinfo +1 -1
- package/dist/components/index.js +1 -0
- package/dist/components/index.ts +1 -0
- package/dist/components/page/Login/LoginShareCheckContainer.jsx +3 -43
- package/dist/components/page/Login/LoginShareCheckContainer.tsx +3 -47
- package/dist/components/page/Login/_api/_server/appLoginInfo.d.ts +2 -0
- package/dist/components/page/Login/_api/_server/appLoginInfo.js +62 -0
- package/dist/components/page/Login/_api/_server/appLoginInfo.ts +54 -0
- package/dist/components/page/Login/_api/checkThirdPartyCookie.d.ts +2 -0
- package/dist/components/page/Login/_api/checkThirdPartyCookie.js +29 -0
- package/dist/components/page/Login/_api/checkThirdPartyCookie.ts +21 -0
- package/dist/components/page/Login/_api/fetchAuthCallback.d.ts +2 -0
- package/dist/components/page/Login/_api/fetchAuthCallback.js +18 -0
- package/dist/components/page/Login/_api/fetchAuthCallback.ts +9 -0
- package/dist/components/page/Login/_api/fetchUserData.d.ts +3 -0
- package/dist/components/page/Login/_api/fetchUserData.js +23 -0
- package/dist/components/page/Login/_api/fetchUserData.ts +16 -0
- package/dist/components/page/MyCase/[id]/_component/DetailInfo.jsx +3 -3
- package/dist/components/page/MyCase/[id]/_component/DetailInfo.tsx +6 -4
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +1 -1
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
2
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
3
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
4
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
5
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
6
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
7
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
8
|
+
});
|
|
9
|
+
};
|
|
10
|
+
/** 쿠키 허용 여부 확인 */
|
|
11
|
+
export const checkThirdPartyCookie = () => __awaiter(void 0, void 0, void 0, function* () {
|
|
12
|
+
try {
|
|
13
|
+
const createCookieResult = yield fetch(`${process.env.NEXT_PUBLIC_LAWFIRM_API}/api/app/auth`, {
|
|
14
|
+
method: 'POST',
|
|
15
|
+
credentials: 'include'
|
|
16
|
+
}).then(res => res.json());
|
|
17
|
+
if (createCookieResult.result) {
|
|
18
|
+
const checkCookieResult = yield fetch(`${process.env.NEXT_PUBLIC_LAWFIRM_API}/api/app/auth/check`, {
|
|
19
|
+
method: 'GET',
|
|
20
|
+
credentials: 'include'
|
|
21
|
+
}).then(res => res.json());
|
|
22
|
+
return checkCookieResult.result && !checkCookieResult.message;
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
catch (error) {
|
|
26
|
+
console.error('Error checking third-party cookies:', error);
|
|
27
|
+
}
|
|
28
|
+
return false;
|
|
29
|
+
});
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
/** 쿠키 허용 여부 확인 */
|
|
2
|
+
export const checkThirdPartyCookie = async () => {
|
|
3
|
+
try {
|
|
4
|
+
const createCookieResult = await fetch(`${process.env.NEXT_PUBLIC_LAWFIRM_API}/api/app/auth`, {
|
|
5
|
+
method: 'POST',
|
|
6
|
+
credentials: 'include'
|
|
7
|
+
}).then(res => res.json());
|
|
8
|
+
|
|
9
|
+
if (createCookieResult.result) {
|
|
10
|
+
const checkCookieResult = await fetch(`${process.env.NEXT_PUBLIC_LAWFIRM_API}/api/app/auth/check`, {
|
|
11
|
+
method: 'GET',
|
|
12
|
+
credentials: 'include'
|
|
13
|
+
}).then(res => res.json());
|
|
14
|
+
|
|
15
|
+
return checkCookieResult.result && !checkCookieResult.message;
|
|
16
|
+
}
|
|
17
|
+
} catch (error) {
|
|
18
|
+
console.error('Error checking third-party cookies:', error);
|
|
19
|
+
}
|
|
20
|
+
return false;
|
|
21
|
+
};
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
2
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
3
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
4
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
5
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
6
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
7
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
8
|
+
});
|
|
9
|
+
};
|
|
10
|
+
/** 로그인 콜백 처리 */
|
|
11
|
+
export const fetchAuthCallback = () => __awaiter(void 0, void 0, void 0, function* () {
|
|
12
|
+
return yield fetch(`${process.env.NEXT_PUBLIC_LAWFIRM_API}/api/app/auth/callback`, {
|
|
13
|
+
method: 'GET',
|
|
14
|
+
headers: { 'Content-Type': 'application/json' },
|
|
15
|
+
cache: 'no-cache',
|
|
16
|
+
credentials: 'include'
|
|
17
|
+
}).then(res => res.json());
|
|
18
|
+
});
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/** 로그인 콜백 처리 */
|
|
2
|
+
export const fetchAuthCallback = async () => {
|
|
3
|
+
return await fetch(`${process.env.NEXT_PUBLIC_LAWFIRM_API}/api/app/auth/callback`, {
|
|
4
|
+
method: 'GET',
|
|
5
|
+
headers: { 'Content-Type': 'application/json' },
|
|
6
|
+
cache: 'no-cache',
|
|
7
|
+
credentials: 'include'
|
|
8
|
+
}).then(res => res.json());
|
|
9
|
+
};
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
2
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
3
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
4
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
5
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
6
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
7
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
8
|
+
});
|
|
9
|
+
};
|
|
10
|
+
/** 쿠키 허용 시 유저 정보 조회 */
|
|
11
|
+
export const fetchUserData = () => __awaiter(void 0, void 0, void 0, function* () {
|
|
12
|
+
var _a, _b;
|
|
13
|
+
const result = yield fetch(`${process.env.NEXT_PUBLIC_SERVICE_DOMAIN}/api/lawfirm/app/user`, {
|
|
14
|
+
method: 'GET',
|
|
15
|
+
headers: { 'Content-Type': 'application/json' },
|
|
16
|
+
cache: 'no-cache',
|
|
17
|
+
credentials: 'include'
|
|
18
|
+
}).then(res => res.json());
|
|
19
|
+
if (((_a = result.data) === null || _a === void 0 ? void 0 : _a.email) && ((_b = result.data) === null || _b === void 0 ? void 0 : _b.name)) {
|
|
20
|
+
return { email: result.data.email, name: result.data.name, provider: result.data.provider, isLogin: true };
|
|
21
|
+
}
|
|
22
|
+
return null;
|
|
23
|
+
});
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { ILoginInfo } from '../_types/login';
|
|
2
|
+
|
|
3
|
+
/** 쿠키 허용 시 유저 정보 조회 */
|
|
4
|
+
export const fetchUserData = async (): Promise<ILoginInfo | null> => {
|
|
5
|
+
const result = await fetch(`${process.env.NEXT_PUBLIC_SERVICE_DOMAIN}/api/lawfirm/app/user`, {
|
|
6
|
+
method: 'GET',
|
|
7
|
+
headers: { 'Content-Type': 'application/json' },
|
|
8
|
+
cache: 'no-cache',
|
|
9
|
+
credentials: 'include'
|
|
10
|
+
}).then(res => res.json());
|
|
11
|
+
|
|
12
|
+
if (result.data?.email && result.data?.name) {
|
|
13
|
+
return { email: result.data.email, name: result.data.name, provider: result.data.provider, isLogin: true };
|
|
14
|
+
}
|
|
15
|
+
return null;
|
|
16
|
+
};
|
|
@@ -4,7 +4,7 @@ import CaseLayout from '../../_component/_layout/CaseLayout';
|
|
|
4
4
|
import Loading from '../../_component/_loading/Loading';
|
|
5
5
|
import caseLookupLinkout from '../../../../../asset/images/myCase/icon/case_lookup_linkout.webp';
|
|
6
6
|
const Line = ({ title, content, isFirst = false }) => {
|
|
7
|
-
return (<div className={`lg;py-[28px] border-
|
|
7
|
+
return (<div className={`lg;py-[28px] flex flex-row border-solid border-grayScale5 py-[20px] sm-top:py-[20px] ${isFirst ? 'border-y-[1px]' : 'border-b-[1px]'}`}>
|
|
8
8
|
<div className="body_medium2_mo sm-top:body_medium2_tb lg:body_medium2 w-[30%]">{title}</div>
|
|
9
9
|
<div className="body_medium1_mo sm-top:body_medium1_tb lg:body_medium1 w-[70%]">
|
|
10
10
|
{Array.isArray(content)
|
|
@@ -30,9 +30,9 @@ const DetailInfo = ({ detailList, isLoading }) => {
|
|
|
30
30
|
<Line title="상대방 정보" content={(detailList === null || detailList === void 0 ? void 0 : detailList.other_info.length) > 0
|
|
31
31
|
? detailList === null || detailList === void 0 ? void 0 : detailList.other_info.map((info, index) => `${info.position} / ${info.name} / ${info.tel}`)
|
|
32
32
|
: '-'}/>
|
|
33
|
-
<Link href="
|
|
33
|
+
<Link href="https://www.scourt.go.kr/portal/information/events/search/search.jsp" target="_blank" rel="noopener noreferrer" className={'itesm-center top-[16px] mt-[16px] flex w-full justify-end sm-top:mt-[20px]'}>
|
|
34
34
|
<div className="flex flex-row items-center gap-[8px] lg:gap-[12px]">
|
|
35
|
-
<Image src={caseLookupLinkout} alt="edit" width={28} height={28} className="sm-top:h-[20px] sm-top:w-[20px]
|
|
35
|
+
<Image src={caseLookupLinkout} alt="edit" width={28} height={28} className="h-[16px] w-[16px] sm-top:h-[20px] sm-top:w-[20px] lg:h-[28px] lg:w-[28px]"/>
|
|
36
36
|
<p className="body_medium2_mo sm-top:body_medium2_tb lg:body_medium2">
|
|
37
37
|
대법원 사건 조회하기
|
|
38
38
|
</p>
|
|
@@ -18,7 +18,7 @@ const Line = ({
|
|
|
18
18
|
}) => {
|
|
19
19
|
return (
|
|
20
20
|
<div
|
|
21
|
-
className={`lg;py-[28px] border-
|
|
21
|
+
className={`lg;py-[28px] flex flex-row border-solid border-grayScale5 py-[20px] sm-top:py-[20px] ${
|
|
22
22
|
isFirst ? 'border-y-[1px]' : 'border-b-[1px]'
|
|
23
23
|
}`}
|
|
24
24
|
>
|
|
@@ -68,8 +68,10 @@ const DetailInfo = ({ detailList, isLoading }: { detailList: DetailList; isLoadi
|
|
|
68
68
|
}
|
|
69
69
|
/>
|
|
70
70
|
<Link
|
|
71
|
-
href="
|
|
72
|
-
|
|
71
|
+
href="https://www.scourt.go.kr/portal/information/events/search/search.jsp"
|
|
72
|
+
target="_blank"
|
|
73
|
+
rel="noopener noreferrer"
|
|
74
|
+
className={'itesm-center top-[16px] mt-[16px] flex w-full justify-end sm-top:mt-[20px]'}
|
|
73
75
|
>
|
|
74
76
|
<div className="flex flex-row items-center gap-[8px] lg:gap-[12px]">
|
|
75
77
|
<Image
|
|
@@ -77,7 +79,7 @@ const DetailInfo = ({ detailList, isLoading }: { detailList: DetailList; isLoadi
|
|
|
77
79
|
alt="edit"
|
|
78
80
|
width={28}
|
|
79
81
|
height={28}
|
|
80
|
-
className="sm-top:h-[20px] sm-top:w-[20px]
|
|
82
|
+
className="h-[16px] w-[16px] sm-top:h-[20px] sm-top:w-[20px] lg:h-[28px] lg:w-[28px]"
|
|
81
83
|
/>
|
|
82
84
|
<p className="body_medium2_mo sm-top:body_medium2_tb lg:body_medium2">
|
|
83
85
|
대법원 사건 조회하기
|