From ba39598d0596ed80a62a6c63c5c270015f1c9880 Mon Sep 17 00:00:00 2001 From: rail <78732904+jongse7@users.noreply.github.com> Date: Fri, 1 Nov 2024 17:12:28 +0900 Subject: [PATCH 1/3] =?UTF-8?q?feat:=20redirect=20=EC=9E=90=EC=B9=98?= =?UTF-8?q?=EA=B8=B0=EA=B5=AC=20=EB=A1=9C=EA=B7=B8=EC=9D=B8=20=EA=B5=AC?= =?UTF-8?q?=ED=98=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../containers/GeneralRegisterSection.tsx | 7 ++++++- .../kakao/containers/RegisterButtonSection.tsx | 18 ++++++------------ src/pages/kakao/redirect/page.tsx | 2 +- 3 files changed, 13 insertions(+), 14 deletions(-) diff --git a/src/pages/general/containers/GeneralRegisterSection.tsx b/src/pages/general/containers/GeneralRegisterSection.tsx index 2342a239..c44000ce 100644 --- a/src/pages/general/containers/GeneralRegisterSection.tsx +++ b/src/pages/general/containers/GeneralRegisterSection.tsx @@ -10,6 +10,7 @@ import { client } from '@/apis/client'; import { LoginSchemaRegister, LoginType, LoginSchemaScoucil, LoginScoucilType } from './ZodCheck'; import { useSetRecoilState } from 'recoil'; import { LoginState } from '@/recoil/atoms/atom'; +import { access } from 'fs'; interface LoginFormProps { subSection1: string; @@ -111,7 +112,11 @@ export function GeneralRegisterSection({ subSection1, buttonSection }: LoginForm }); if (response.status === 200) { - if (redirectUrl != null) { + if (redirectUrl !== null) { + if (!accessToken) { + accessToken = response.data?.data?.accessToken; + } + console.log(accessToken); const separator = redirectUrl.includes('?') ? '&' : '?'; const newRedirectUrl = `${redirectUrl}${separator}accessToken=${encodeURIComponent(accessToken)}`; localStorage.removeItem('redirectUrl'); diff --git a/src/pages/kakao/containers/RegisterButtonSection.tsx b/src/pages/kakao/containers/RegisterButtonSection.tsx index 32e4509f..5f329d19 100644 --- a/src/pages/kakao/containers/RegisterButtonSection.tsx +++ b/src/pages/kakao/containers/RegisterButtonSection.tsx @@ -12,11 +12,7 @@ const handleLogin = () => { window.location.href = KAKAO_AUTH_URL; }; -interface type { - isRedirect?: boolean; -} - -export function RegisterButtonSection({ isRedirect = false }: type) { +export function RegisterButtonSection() { return (
- {!isRedirect && ( - -
- 학생자치기구 로그인 -
- - )} + +
+ 학생자치기구 로그인 +
+ ); diff --git a/src/pages/kakao/redirect/page.tsx b/src/pages/kakao/redirect/page.tsx index 2192ecd1..b7467e66 100644 --- a/src/pages/kakao/redirect/page.tsx +++ b/src/pages/kakao/redirect/page.tsx @@ -20,7 +20,7 @@ export function KakaoRegisterRedirectPage() {
- +
From 0b4f736d85a6e889cfe1f246283a2da61d2ed810 Mon Sep 17 00:00:00 2001 From: rail <78732904+jongse7@users.noreply.github.com> Date: Fri, 1 Nov 2024 17:12:52 +0900 Subject: [PATCH 2/3] =?UTF-8?q?feat:=20redirect=20=EC=9E=90=EC=B9=98?= =?UTF-8?q?=EA=B8=B0=EA=B5=AC=20=EB=A1=9C=EA=B7=B8=EC=9D=B8=20=EA=B5=AC?= =?UTF-8?q?=ED=98=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/pages/general/containers/GeneralRegisterSection.tsx | 1 - 1 file changed, 1 deletion(-) diff --git a/src/pages/general/containers/GeneralRegisterSection.tsx b/src/pages/general/containers/GeneralRegisterSection.tsx index c44000ce..6d7c5b95 100644 --- a/src/pages/general/containers/GeneralRegisterSection.tsx +++ b/src/pages/general/containers/GeneralRegisterSection.tsx @@ -116,7 +116,6 @@ export function GeneralRegisterSection({ subSection1, buttonSection }: LoginForm if (!accessToken) { accessToken = response.data?.data?.accessToken; } - console.log(accessToken); const separator = redirectUrl.includes('?') ? '&' : '?'; const newRedirectUrl = `${redirectUrl}${separator}accessToken=${encodeURIComponent(accessToken)}`; localStorage.removeItem('redirectUrl'); From 25de24272cda7159701c43bdf70d69099c9b194b Mon Sep 17 00:00:00 2001 From: rail <78732904+jongse7@users.noreply.github.com> Date: Fri, 1 Nov 2024 17:15:45 +0900 Subject: [PATCH 3/3] =?UTF-8?q?feat:=20yarn=20run=20build=20=EC=98=A4?= =?UTF-8?q?=EB=A5=98=20=ED=95=B4=EA=B2=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/pages/general/containers/GeneralRegisterSection.tsx | 1 - 1 file changed, 1 deletion(-) diff --git a/src/pages/general/containers/GeneralRegisterSection.tsx b/src/pages/general/containers/GeneralRegisterSection.tsx index 6d7c5b95..09813c62 100644 --- a/src/pages/general/containers/GeneralRegisterSection.tsx +++ b/src/pages/general/containers/GeneralRegisterSection.tsx @@ -10,7 +10,6 @@ import { client } from '@/apis/client'; import { LoginSchemaRegister, LoginType, LoginSchemaScoucil, LoginScoucilType } from './ZodCheck'; import { useSetRecoilState } from 'recoil'; import { LoginState } from '@/recoil/atoms/atom'; -import { access } from 'fs'; interface LoginFormProps { subSection1: string;