@daeryun/dr_components 0.4.41 → 0.4.43
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/common/integrate/index.d.ts +1 -1
- package/dist/components/common/integrate/index.jsx +7 -3
- package/dist/components/common/integrate/index.tsx +10 -3
- package/dist/components/page/Integrate/Broadcast.jsx +0 -10
- package/dist/components/page/Integrate/Broadcast.tsx +0 -11
- package/dist/components/page/Integrate/Field.jsx +0 -9
- package/dist/components/page/Integrate/Field.tsx +0 -10
- package/dist/components/page/Integrate/Reply.jsx +0 -9
- package/dist/components/page/Integrate/Reply.tsx +0 -9
- package/dist/components/page/Integrate/Success.jsx +1 -12
- package/dist/components/page/Integrate/Success.tsx +1 -10
- package/dist/components/page/Login/Login.jsx +26 -1
- package/dist/components/page/Login/Login.tsx +18 -0
- package/dist/components/page/Login/Sign.jsx +26 -1
- package/dist/components/page/Login/Sign.tsx +20 -2
- package/dist/styles/globals.css +176 -176
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +1 -1
|
@@ -1,6 +1,17 @@
|
|
|
1
1
|
'use client';
|
|
2
|
-
|
|
2
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
+
});
|
|
10
|
+
};
|
|
11
|
+
import React, { Suspense, useEffect } from 'react';
|
|
12
|
+
import { usePathname } from 'next/navigation';
|
|
3
13
|
import LoginContainer from './LoginComp/LoginContainer';
|
|
14
|
+
import { fetchUserData } from './_api/fetchUserData';
|
|
4
15
|
const Login = ({ layoutClassName = ' relative h-[100vh] max-h-[1200px] min-h-[1000px] w-full overflow-hidden bg-white font-[SUIT] ' +
|
|
5
16
|
' max-3xl:max-h-[1080px] max-3xl:min-h-[1000px] ' +
|
|
6
17
|
' max-lg:min-h-[930px] ' +
|
|
@@ -8,6 +19,20 @@ const Login = ({ layoutClassName = ' relative h-[100vh] max-h-[1200px] min-h-[10
|
|
|
8
19
|
' mb-[192px] mt-[128px] ' +
|
|
9
20
|
' max-lg:mt-[112px] ' +
|
|
10
21
|
' max-sm:mt-[100px] ', state }) => {
|
|
22
|
+
const pathName = usePathname();
|
|
23
|
+
const userCheck = () => __awaiter(void 0, void 0, void 0, function* () {
|
|
24
|
+
const result = yield fetchUserData();
|
|
25
|
+
return result.isLogin;
|
|
26
|
+
});
|
|
27
|
+
useEffect(() => {
|
|
28
|
+
const checkUser = () => __awaiter(void 0, void 0, void 0, function* () {
|
|
29
|
+
const result = yield userCheck();
|
|
30
|
+
if (result) {
|
|
31
|
+
window.location.href = '/';
|
|
32
|
+
}
|
|
33
|
+
});
|
|
34
|
+
checkUser();
|
|
35
|
+
}, [pathName]);
|
|
11
36
|
return (<Suspense>
|
|
12
37
|
<LoginContainer layoutClassName={layoutClassName} state={state}/>
|
|
13
38
|
</Suspense>);
|
|
@@ -7,6 +7,8 @@ import PageWrapper from '../../Layout/PageWrapper';
|
|
|
7
7
|
import { setCookie } from '../../../lib';
|
|
8
8
|
import LoginBreadCrumb from './LoginComp/LoginBreadCrumb';
|
|
9
9
|
import LoginContainer from './LoginComp/LoginContainer';
|
|
10
|
+
import { ILoginInfo } from './_types/login';
|
|
11
|
+
import { fetchUserData } from './_api/fetchUserData';
|
|
10
12
|
|
|
11
13
|
interface props {
|
|
12
14
|
layoutClassName?: string; // 높이 및 마진값 조절
|
|
@@ -22,6 +24,22 @@ const Login = ({
|
|
|
22
24
|
' max-sm:mt-[100px] ',
|
|
23
25
|
state
|
|
24
26
|
}: props) => {
|
|
27
|
+
const pathName = usePathname();
|
|
28
|
+
const userCheck = async (): Promise<boolean> => {
|
|
29
|
+
const result: ILoginInfo = await fetchUserData();
|
|
30
|
+
return result.isLogin;
|
|
31
|
+
};
|
|
32
|
+
|
|
33
|
+
useEffect(() => {
|
|
34
|
+
const checkUser = async () => {
|
|
35
|
+
const result = await userCheck();
|
|
36
|
+
if (result) {
|
|
37
|
+
window.location.href = '/';
|
|
38
|
+
}
|
|
39
|
+
};
|
|
40
|
+
|
|
41
|
+
checkUser();
|
|
42
|
+
}, [pathName]);
|
|
25
43
|
return (
|
|
26
44
|
<Suspense>
|
|
27
45
|
<LoginContainer layoutClassName={layoutClassName} state={state} />
|
|
@@ -1,7 +1,32 @@
|
|
|
1
1
|
'use client';
|
|
2
|
-
|
|
2
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
+
});
|
|
10
|
+
};
|
|
11
|
+
import React, { Suspense, useEffect } from 'react';
|
|
3
12
|
import SignContainer from './LoginComp/SignContainer';
|
|
13
|
+
import { usePathname } from 'next/navigation';
|
|
14
|
+
import { fetchUserData } from './_api/fetchUserData';
|
|
4
15
|
const Sign = ({ layoutClassName = `mt-[47px] py-[128px] max-lg:mt-[40px] max-lg:py-[112px] max-sm:mt-[28px] max-sm:py-[100px]`, setUser }) => {
|
|
16
|
+
const pathName = usePathname();
|
|
17
|
+
const userCheck = () => __awaiter(void 0, void 0, void 0, function* () {
|
|
18
|
+
const result = yield fetchUserData();
|
|
19
|
+
return result.isLogin;
|
|
20
|
+
});
|
|
21
|
+
useEffect(() => {
|
|
22
|
+
const checkUser = () => __awaiter(void 0, void 0, void 0, function* () {
|
|
23
|
+
const result = yield userCheck();
|
|
24
|
+
if (result) {
|
|
25
|
+
window.location.href = '/';
|
|
26
|
+
}
|
|
27
|
+
});
|
|
28
|
+
checkUser();
|
|
29
|
+
}, [pathName]);
|
|
5
30
|
return (<Suspense>
|
|
6
31
|
<SignContainer layoutClassName={layoutClassName} setUser={setUser}/>
|
|
7
32
|
</Suspense>);
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
'use client';
|
|
2
|
-
import React, { Suspense } from 'react';
|
|
3
|
-
import { RecoilState } from 'recoil';
|
|
2
|
+
import React, { Suspense, useEffect } from 'react';
|
|
4
3
|
import SignContainer from './LoginComp/SignContainer';
|
|
5
4
|
import { ILoginInfo } from './_types/login';
|
|
5
|
+
import { usePathname, useRouter } from 'next/navigation';
|
|
6
|
+
import { fetchUserData } from './_api/fetchUserData';
|
|
6
7
|
|
|
7
8
|
type props = {
|
|
8
9
|
layoutClassName?: string;
|
|
@@ -13,6 +14,23 @@ const Sign = ({
|
|
|
13
14
|
layoutClassName = `mt-[47px] py-[128px] max-lg:mt-[40px] max-lg:py-[112px] max-sm:mt-[28px] max-sm:py-[100px]`,
|
|
14
15
|
setUser
|
|
15
16
|
}: props) => {
|
|
17
|
+
const pathName = usePathname();
|
|
18
|
+
const userCheck = async (): Promise<boolean> => {
|
|
19
|
+
const result: ILoginInfo = await fetchUserData();
|
|
20
|
+
return result.isLogin;
|
|
21
|
+
};
|
|
22
|
+
|
|
23
|
+
useEffect(() => {
|
|
24
|
+
const checkUser = async () => {
|
|
25
|
+
const result = await userCheck();
|
|
26
|
+
if (result) {
|
|
27
|
+
window.location.href = '/';
|
|
28
|
+
}
|
|
29
|
+
};
|
|
30
|
+
|
|
31
|
+
checkUser();
|
|
32
|
+
}, [pathName]);
|
|
33
|
+
|
|
16
34
|
return (
|
|
17
35
|
<Suspense>
|
|
18
36
|
<SignContainer layoutClassName={layoutClassName} setUser={setUser} />
|