From 62166cb061f772447a7591d46a52d11160674e28 Mon Sep 17 00:00:00 2001
From: HyunWoo Choi <116826162+chhw130@users.noreply.github.com>
Date: Sat, 16 Dec 2023 20:21:47 +0900
Subject: [PATCH] =?UTF-8?q?fix(logic)=20:=20=EC=86=8C=EC=85=9C=EB=A1=9C?=
=?UTF-8?q?=EA=B7=B8=EC=9D=B8=20=3D>=20=EC=B2=B4=ED=97=98=ED=98=95?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
component/Funnel/LoginFunnel.tsx | 15 ++----
component/Funnel/MainFunnel.tsx | 73 +++++++++++++++------------
component/template/MyPageTemplate.tsx | 10 +---
component/template/SignupTemplate.tsx | 8 +--
src/app/detail/page.tsx | 1 +
src/app/main/page.tsx | 7 +--
src/app/signup/page.tsx | 10 ++--
7 files changed, 54 insertions(+), 70 deletions(-)
diff --git a/component/Funnel/LoginFunnel.tsx b/component/Funnel/LoginFunnel.tsx
index 00f3fed..11068ee 100644
--- a/component/Funnel/LoginFunnel.tsx
+++ b/component/Funnel/LoginFunnel.tsx
@@ -8,14 +8,9 @@ import VerticalLogoIcon from "../icon/VerticalLogoIcon";
const LoginFunnel = () => {
const router = useRouter();
- const Rest_api_key = "536cb646ce60d71102dc92d2b7845c8d"; //REST API KEY
- const redirect_uri = "http://localhost:3000/signup"; //Redirect URI
- // oauth 요청 URL
- const kakaoURL = `https://kauth.kakao.com/oauth/authorize?client_id=${Rest_api_key}&redirect_uri=${redirect_uri}&response_type=code`;
-
- const signUpKakaoHandler = () => {
- window.location.href = kakaoURL;
- };
+ // const signUpKakaoHandler = () => {
+ // window.location.href = kakaoURL;
+ // };
return (
@@ -32,9 +27,9 @@ const LoginFunnel = () => {
flexDir={"column"}
gap={"20px"}
>
- signUpKakaoHandler()} cursor={"pointer"}>
+ {/* signUpKakaoHandler()} cursor={"pointer"}>
-
+ */}
{
return (
<>
-
+
{
을 추천 받자!
-
-
-
-
- 나.. 오늘 얼마나 먹었더라?
-
안 찌려면 얼마만큼 운동해야하지?
-
-
-
-
- {
- setFunnel("login");
- }}
+
+
+
+ 나.. 오늘 얼마나 먹었더라?
+
안 찌려면 얼마만큼 운동해야하지?
+
+
+
+
+
- 다음으로
-
-
+ {
+ setFunnel("login");
+ }}
+ >
+ 다음으로
+
+
+
>
);
};
diff --git a/component/template/MyPageTemplate.tsx b/component/template/MyPageTemplate.tsx
index 9884697..fd8cc8a 100644
--- a/component/template/MyPageTemplate.tsx
+++ b/component/template/MyPageTemplate.tsx
@@ -12,15 +12,6 @@ const MyPageTemplate = () => {
const router = useRouter();
const [userData, setUserData] = useState();
- useEffect(() => {
- let userInfo = localStorage.getItem("userInfo");
- if (userInfo !== null) {
- const userParsing: UserInfoType = JSON.parse(userInfo);
- console.log(userParsing);
- setUserData(userParsing);
- }
- }, [setUserData]);
-
return (
<>
{
h={"100vh"}
pos={"relative"}
maxW={"390px"}
+ minH={"844px"}
padding={"60px 22px 0px 22px"}
margin={"0 auto"}
alignItems={"center"}
diff --git a/component/template/SignupTemplate.tsx b/component/template/SignupTemplate.tsx
index 91a18b4..f110eaa 100644
--- a/component/template/SignupTemplate.tsx
+++ b/component/template/SignupTemplate.tsx
@@ -17,7 +17,7 @@ export interface UserInfoType {
targetweight: number;
}
-const SignupTemplate = ({ jwtToken }: { jwtToken: JwtToken }) => {
+const SignupTemplate = ({ jwtToken }: { jwtToken?: JwtToken }) => {
const [progress, setProgress] = useState(33.3);
const [userInfo, setUserInfo] = useState({
name: "",
@@ -29,12 +29,6 @@ const SignupTemplate = ({ jwtToken }: { jwtToken: JwtToken }) => {
});
const { funnel, setFunnel } = useFunnel("userAgreement");
- useEffect(() => {
- if (jwtToken) {
- localStorage.setItem("jwt", jwtToken.jwt);
- }
- }, [jwtToken]);
-
return (
<>