From f4713ebafac476d6b6c0b88cc37ddf0c57d865c8 Mon Sep 17 00:00:00 2001 From: yeeZinu Date: Thu, 13 Jun 2024 18:34:51 +0900 Subject: [PATCH 01/11] =?UTF-8?q?doc:=20=ED=8C=94=EB=A1=9C=EC=9A=B0?= =?UTF-8?q?=EB=8D=B0=EC=9D=B4=ED=84=B0=20=EC=A3=BC=EC=84=9D=EC=A0=9C?= =?UTF-8?q?=EA=B1=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../userpage/[userId]/components/FollowList/FollowList.tsx | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/app/(userpage)/userpage/[userId]/components/FollowList/FollowList.tsx b/src/app/(userpage)/userpage/[userId]/components/FollowList/FollowList.tsx index 22d8cc7..68fc1d1 100644 --- a/src/app/(userpage)/userpage/[userId]/components/FollowList/FollowList.tsx +++ b/src/app/(userpage)/userpage/[userId]/components/FollowList/FollowList.tsx @@ -11,8 +11,6 @@ type FollowListProps = { }; export default function FollowList({ followData }: FollowListProps) { - console.log(followData); - return (
{followData.list.map((item) => ( From 2a0c9f5508741202a4e6e9455a6d9784c217961c Mon Sep 17 00:00:00 2001 From: yeeZinu Date: Thu, 13 Jun 2024 18:42:36 +0900 Subject: [PATCH 02/11] =?UTF-8?q?refactor:=20mypage=20->=20userpage[userid?= =?UTF-8?q?]=EB=A1=9C=20=EB=B3=80=EA=B2=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/app/(userpage)/mypage/MyPage.module.scss | 8 -------- src/app/(userpage)/mypage/page.tsx | 16 ---------------- src/components/Gnb/Gnb.tsx | 4 ++-- 3 files changed, 2 insertions(+), 26 deletions(-) delete mode 100644 src/app/(userpage)/mypage/MyPage.module.scss delete mode 100644 src/app/(userpage)/mypage/page.tsx diff --git a/src/app/(userpage)/mypage/MyPage.module.scss b/src/app/(userpage)/mypage/MyPage.module.scss deleted file mode 100644 index e185a12..0000000 --- a/src/app/(userpage)/mypage/MyPage.module.scss +++ /dev/null @@ -1,8 +0,0 @@ -@import "@/styles/_index"; -@import "@/styles/_media"; - -.container { - display: flex; - align-items: center; - justify-content: center; -} diff --git a/src/app/(userpage)/mypage/page.tsx b/src/app/(userpage)/mypage/page.tsx deleted file mode 100644 index e84f7ac..0000000 --- a/src/app/(userpage)/mypage/page.tsx +++ /dev/null @@ -1,16 +0,0 @@ -"use client"; - -import Link from "next/link"; -import React from "react"; -import cn from "@/utils/classNames"; -import styles from "./MyPage.module.scss"; - -export default function MyPage() { - const userId = "2"; - return ( -
- MyPage - 이동 부탁 -
- ); -} diff --git a/src/components/Gnb/Gnb.tsx b/src/components/Gnb/Gnb.tsx index 1108962..6a68103 100644 --- a/src/components/Gnb/Gnb.tsx +++ b/src/components/Gnb/Gnb.tsx @@ -13,7 +13,7 @@ export default function Gnb() { const [isInputOpen, setInputOpen] = useState(false); const [isMenuOpen, setMenuOpen] = useState(false); - const { status } = useSession(); + const { status, data: session } = useSession(); const handleSearchClick = () => { setInputOpen(!isInputOpen); @@ -65,7 +65,7 @@ export default function Gnb() { {status === "authenticated" ? ( <> 비교하기 - 내 프로필 + 내 프로필 ) : ( <> From 236d8f7efa1fd055fb4ce327b22aa650da8238f4 Mon Sep 17 00:00:00 2001 From: yeeZinu Date: Fri, 14 Jun 2024 13:43:37 +0900 Subject: [PATCH 03/11] =?UTF-8?q?doc:=20api=20fetching=EC=97=90=20?= =?UTF-8?q?=EB=94=B0=EB=A5=B8=20=ED=8F=B4=EB=8D=94=20=EB=84=A4=EC=9D=B4?= =?UTF-8?q?=EB=B0=8D=20=EC=88=98=EC=A0=95=20(#35)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/app/(userpage)/types.tsx | 22 +++--- .../[userId]/UserPage.module.scss | 0 .../FollowList/FollowList.module.scss | 0 .../components/FollowList/FollowList.tsx | 0 .../FollowModal/FollowModal.module.scss | 0 .../components/FollowModal/FollowModal.tsx | 0 .../HTMLContent/HTMLContent.module.scss | 0 .../components/HTMLContent/HTMLContent.tsx | 0 .../TabButton/TabButton.module.scss | 0 .../components/TabButton/TabButton.tsx | 0 .../UserActivityList.module.scss | 0 .../UserActivityList/UserActivityList.tsx | 0 .../components/UserInfo/UserInfo.module.scss | 0 .../[userId]/components/UserInfo/UserInfo.tsx | 0 .../UserProductList.module.scss | 0 .../UserProductList/UserProductList.tsx | 0 src/app/(userpage)/user/[userId]/page.tsx | 76 +++++++++++++++++++ src/app/(userpage)/userpage/[userId]/page.tsx | 50 ------------ src/components/Gnb/Gnb.tsx | 2 +- 19 files changed, 88 insertions(+), 62 deletions(-) rename src/app/(userpage)/{userpage => user}/[userId]/UserPage.module.scss (100%) rename src/app/(userpage)/{userpage => user}/[userId]/components/FollowList/FollowList.module.scss (100%) rename src/app/(userpage)/{userpage => user}/[userId]/components/FollowList/FollowList.tsx (100%) rename src/app/(userpage)/{userpage => user}/[userId]/components/FollowModal/FollowModal.module.scss (100%) rename src/app/(userpage)/{userpage => user}/[userId]/components/FollowModal/FollowModal.tsx (100%) rename src/app/(userpage)/{userpage => user}/[userId]/components/HTMLContent/HTMLContent.module.scss (100%) rename src/app/(userpage)/{userpage => user}/[userId]/components/HTMLContent/HTMLContent.tsx (100%) rename src/app/(userpage)/{userpage => user}/[userId]/components/TabButton/TabButton.module.scss (100%) rename src/app/(userpage)/{userpage => user}/[userId]/components/TabButton/TabButton.tsx (100%) rename src/app/(userpage)/{userpage => user}/[userId]/components/UserActivityList/UserActivityList.module.scss (100%) rename src/app/(userpage)/{userpage => user}/[userId]/components/UserActivityList/UserActivityList.tsx (100%) rename src/app/(userpage)/{userpage => user}/[userId]/components/UserInfo/UserInfo.module.scss (100%) rename src/app/(userpage)/{userpage => user}/[userId]/components/UserInfo/UserInfo.tsx (100%) rename src/app/(userpage)/{userpage => user}/[userId]/components/UserProductList/UserProductList.module.scss (100%) rename src/app/(userpage)/{userpage => user}/[userId]/components/UserProductList/UserProductList.tsx (100%) create mode 100644 src/app/(userpage)/user/[userId]/page.tsx delete mode 100644 src/app/(userpage)/userpage/[userId]/page.tsx diff --git a/src/app/(userpage)/types.tsx b/src/app/(userpage)/types.tsx index d636765..7ea8a9a 100644 --- a/src/app/(userpage)/types.tsx +++ b/src/app/(userpage)/types.tsx @@ -1,20 +1,20 @@ export type UserDetail = { - updatedAt: Date; - createdAt: Date; - teamId: string; - image: string; - description: string; - nickname: string; id: number; + nickname: string; + description: string; + image: string; + createdAt: string; + updatedAt: string; + teamId: string; + isFollowing: boolean; + followersCount: number; + followeesCount: number; + reviewCount: number; + averageRating: number; mostFavoriteCategory: { name: string; id: number; }; - averageRating: number; - reviewCount: number; - followeesCount: number; - followersCount: number; - isFollowing: boolean; }; export type UserProduct = { diff --git a/src/app/(userpage)/userpage/[userId]/UserPage.module.scss b/src/app/(userpage)/user/[userId]/UserPage.module.scss similarity index 100% rename from src/app/(userpage)/userpage/[userId]/UserPage.module.scss rename to src/app/(userpage)/user/[userId]/UserPage.module.scss diff --git a/src/app/(userpage)/userpage/[userId]/components/FollowList/FollowList.module.scss b/src/app/(userpage)/user/[userId]/components/FollowList/FollowList.module.scss similarity index 100% rename from src/app/(userpage)/userpage/[userId]/components/FollowList/FollowList.module.scss rename to src/app/(userpage)/user/[userId]/components/FollowList/FollowList.module.scss diff --git a/src/app/(userpage)/userpage/[userId]/components/FollowList/FollowList.tsx b/src/app/(userpage)/user/[userId]/components/FollowList/FollowList.tsx similarity index 100% rename from src/app/(userpage)/userpage/[userId]/components/FollowList/FollowList.tsx rename to src/app/(userpage)/user/[userId]/components/FollowList/FollowList.tsx diff --git a/src/app/(userpage)/userpage/[userId]/components/FollowModal/FollowModal.module.scss b/src/app/(userpage)/user/[userId]/components/FollowModal/FollowModal.module.scss similarity index 100% rename from src/app/(userpage)/userpage/[userId]/components/FollowModal/FollowModal.module.scss rename to src/app/(userpage)/user/[userId]/components/FollowModal/FollowModal.module.scss diff --git a/src/app/(userpage)/userpage/[userId]/components/FollowModal/FollowModal.tsx b/src/app/(userpage)/user/[userId]/components/FollowModal/FollowModal.tsx similarity index 100% rename from src/app/(userpage)/userpage/[userId]/components/FollowModal/FollowModal.tsx rename to src/app/(userpage)/user/[userId]/components/FollowModal/FollowModal.tsx diff --git a/src/app/(userpage)/userpage/[userId]/components/HTMLContent/HTMLContent.module.scss b/src/app/(userpage)/user/[userId]/components/HTMLContent/HTMLContent.module.scss similarity index 100% rename from src/app/(userpage)/userpage/[userId]/components/HTMLContent/HTMLContent.module.scss rename to src/app/(userpage)/user/[userId]/components/HTMLContent/HTMLContent.module.scss diff --git a/src/app/(userpage)/userpage/[userId]/components/HTMLContent/HTMLContent.tsx b/src/app/(userpage)/user/[userId]/components/HTMLContent/HTMLContent.tsx similarity index 100% rename from src/app/(userpage)/userpage/[userId]/components/HTMLContent/HTMLContent.tsx rename to src/app/(userpage)/user/[userId]/components/HTMLContent/HTMLContent.tsx diff --git a/src/app/(userpage)/userpage/[userId]/components/TabButton/TabButton.module.scss b/src/app/(userpage)/user/[userId]/components/TabButton/TabButton.module.scss similarity index 100% rename from src/app/(userpage)/userpage/[userId]/components/TabButton/TabButton.module.scss rename to src/app/(userpage)/user/[userId]/components/TabButton/TabButton.module.scss diff --git a/src/app/(userpage)/userpage/[userId]/components/TabButton/TabButton.tsx b/src/app/(userpage)/user/[userId]/components/TabButton/TabButton.tsx similarity index 100% rename from src/app/(userpage)/userpage/[userId]/components/TabButton/TabButton.tsx rename to src/app/(userpage)/user/[userId]/components/TabButton/TabButton.tsx diff --git a/src/app/(userpage)/userpage/[userId]/components/UserActivityList/UserActivityList.module.scss b/src/app/(userpage)/user/[userId]/components/UserActivityList/UserActivityList.module.scss similarity index 100% rename from src/app/(userpage)/userpage/[userId]/components/UserActivityList/UserActivityList.module.scss rename to src/app/(userpage)/user/[userId]/components/UserActivityList/UserActivityList.module.scss diff --git a/src/app/(userpage)/userpage/[userId]/components/UserActivityList/UserActivityList.tsx b/src/app/(userpage)/user/[userId]/components/UserActivityList/UserActivityList.tsx similarity index 100% rename from src/app/(userpage)/userpage/[userId]/components/UserActivityList/UserActivityList.tsx rename to src/app/(userpage)/user/[userId]/components/UserActivityList/UserActivityList.tsx diff --git a/src/app/(userpage)/userpage/[userId]/components/UserInfo/UserInfo.module.scss b/src/app/(userpage)/user/[userId]/components/UserInfo/UserInfo.module.scss similarity index 100% rename from src/app/(userpage)/userpage/[userId]/components/UserInfo/UserInfo.module.scss rename to src/app/(userpage)/user/[userId]/components/UserInfo/UserInfo.module.scss diff --git a/src/app/(userpage)/userpage/[userId]/components/UserInfo/UserInfo.tsx b/src/app/(userpage)/user/[userId]/components/UserInfo/UserInfo.tsx similarity index 100% rename from src/app/(userpage)/userpage/[userId]/components/UserInfo/UserInfo.tsx rename to src/app/(userpage)/user/[userId]/components/UserInfo/UserInfo.tsx diff --git a/src/app/(userpage)/userpage/[userId]/components/UserProductList/UserProductList.module.scss b/src/app/(userpage)/user/[userId]/components/UserProductList/UserProductList.module.scss similarity index 100% rename from src/app/(userpage)/userpage/[userId]/components/UserProductList/UserProductList.module.scss rename to src/app/(userpage)/user/[userId]/components/UserProductList/UserProductList.module.scss diff --git a/src/app/(userpage)/userpage/[userId]/components/UserProductList/UserProductList.tsx b/src/app/(userpage)/user/[userId]/components/UserProductList/UserProductList.tsx similarity index 100% rename from src/app/(userpage)/userpage/[userId]/components/UserProductList/UserProductList.tsx rename to src/app/(userpage)/user/[userId]/components/UserProductList/UserProductList.tsx diff --git a/src/app/(userpage)/user/[userId]/page.tsx b/src/app/(userpage)/user/[userId]/page.tsx new file mode 100644 index 0000000..755f933 --- /dev/null +++ b/src/app/(userpage)/user/[userId]/page.tsx @@ -0,0 +1,76 @@ +"use client"; + +/* eslint-disable no-restricted-imports */ + +import { useSession } from "next-auth/react"; +import React, { useEffect, useState } from "react"; +// user mock data +// import { userMock } from "@/app/(userpage)/userMock"; +import Activity from "@/components/Card/Activity/Activity"; +import cn from "@/utils/classNames"; +// 추후 데이터 연결시 받아온데이터로 변환 예정 +import HttpClient from "@/utils/httpClient"; +import UserActivityList from "./components/UserActivityList/UserActivityList"; +import UserInfo from "./components/UserInfo/UserInfo"; +import styles from "./UserPage.module.scss"; +import { UserDetail } from "../../types"; + +export default function UserPage({ params }: { params: { userId: number } }) { + const { data: session } = useSession(); + const [userData, setUserData] = useState(); + + const httpClient = new HttpClient(process.env.NEXT_PUBLIC_BASE_URL!); + + const getUserData = async () => { + if (session) { + const ACCESS_TOKEN = session.accessToken; + setUserData( + await httpClient.get(`users/${params.userId}`, { + headers: { Authorization: ACCESS_TOKEN }, + cache: "no-cache", + }), + ); + } + }; + + useEffect(() => { + getUserData(); + }, []); + + return ( +
+ {userData && ( + <> + +
+
+

활동 내역

+
+ + + +
+
+ +
+ + )} +
+ ); +} diff --git a/src/app/(userpage)/userpage/[userId]/page.tsx b/src/app/(userpage)/userpage/[userId]/page.tsx deleted file mode 100644 index 3632755..0000000 --- a/src/app/(userpage)/userpage/[userId]/page.tsx +++ /dev/null @@ -1,50 +0,0 @@ -"use client"; - -// import { useParams } from "next/navigation"; -import React from "react"; -// user mock data -import { userMock } from "@/app/(userpage)/userMock"; -import Activity from "@/components/Card/Activity/Activity"; -import cn from "@/utils/classNames"; -// 추후 데이터 연결시 받아온데이터로 변환 예정 -import UserActivityList from "./components/UserActivityList/UserActivityList"; -import UserInfo from "./components/UserInfo/UserInfo"; -import styles from "./UserPage.module.scss"; - -export default function UserPage() { - // userId를 받아오는 useParams function - // const { userId } = useParams<{ userId: string }>(); - - return ( -
- -
-
-

활동 내역

-
- - - -
-
- -
-
- ); -} diff --git a/src/components/Gnb/Gnb.tsx b/src/components/Gnb/Gnb.tsx index 6a68103..4df62b2 100644 --- a/src/components/Gnb/Gnb.tsx +++ b/src/components/Gnb/Gnb.tsx @@ -65,7 +65,7 @@ export default function Gnb() { {status === "authenticated" ? ( <> 비교하기 - 내 프로필 + 내 프로필 ) : ( <> From 47081931a4492d95c04588c2c61d70be696fd6cc Mon Sep 17 00:00:00 2001 From: yeeZinu Date: Fri, 14 Jun 2024 17:17:43 +0900 Subject: [PATCH 04/11] =?UTF-8?q?feat:=20data=20fetching=20refacting,=20?= =?UTF-8?q?=EB=82=B4=ED=94=84=EB=A1=9C=ED=95=84=20=EC=88=98=EC=A0=95=20?= =?UTF-8?q?=EB=B2=84=ED=8A=BC=20=EC=B6=94=EA=B0=80=20(#35)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/app/(userpage)/page.tsx | 5 -- src/app/(userpage)/{types.tsx => types.ts} | 0 .../components/FollowModal/FollowModal.tsx | 38 ++++++------- .../MyProfileButton.module.scss | 9 +++ .../MyProfileButton/MyProfileButton.tsx | 28 ++++++++++ .../components/UserInfo/UserInfo.module.scss | 12 ++++ .../[userId]/components/UserInfo/UserInfo.tsx | 56 +++++++++++++------ src/app/(userpage)/user/[userId]/page.tsx | 54 ++++++++---------- src/components/Button/Button.module.scss | 12 ---- 9 files changed, 128 insertions(+), 86 deletions(-) delete mode 100644 src/app/(userpage)/page.tsx rename src/app/(userpage)/{types.tsx => types.ts} (100%) create mode 100644 src/app/(userpage)/user/[userId]/components/MyProfileButton/MyProfileButton.module.scss create mode 100644 src/app/(userpage)/user/[userId]/components/MyProfileButton/MyProfileButton.tsx diff --git a/src/app/(userpage)/page.tsx b/src/app/(userpage)/page.tsx deleted file mode 100644 index 1d4fb43..0000000 --- a/src/app/(userpage)/page.tsx +++ /dev/null @@ -1,5 +0,0 @@ -import React from "react"; - -export default function page() { - return
여기 진짜 페이지임 ㅇㅇ
; -} diff --git a/src/app/(userpage)/types.tsx b/src/app/(userpage)/types.ts similarity index 100% rename from src/app/(userpage)/types.tsx rename to src/app/(userpage)/types.ts diff --git a/src/app/(userpage)/user/[userId]/components/FollowModal/FollowModal.tsx b/src/app/(userpage)/user/[userId]/components/FollowModal/FollowModal.tsx index baffb4b..3ffedd9 100644 --- a/src/app/(userpage)/user/[userId]/components/FollowModal/FollowModal.tsx +++ b/src/app/(userpage)/user/[userId]/components/FollowModal/FollowModal.tsx @@ -1,6 +1,7 @@ +import { useQuery } from "@tanstack/react-query"; import Image from "next/image"; import { useSession } from "next-auth/react"; -import React, { useEffect, useState } from "react"; +import React from "react"; import { UserProduct } from "@/app/(userpage)/types"; import Modal from "@/components/Modal/Modal"; import cn from "@/utils/classNames"; @@ -18,31 +19,26 @@ type ModalProps = { export default function FollowModal({ isModalState, setIsModalState, followState }: ModalProps) { const { data: session } = useSession(); - const [followData, setFollowData] = useState(); + const userId = session?.user.id; + const ACCESS_TOKEN = session?.accessToken ?? ""; const httpClient = new HttpClient(process.env.NEXT_PUBLIC_BASE_URL!); - const handleData = async () => { - if (session && followState) { - const userId = session.user.id; - const ACCESS_TOKEN = session.accessToken; - setFollowData( - await httpClient.get(`users/${userId}/${followState}`, { - headers: { Authorization: ACCESS_TOKEN }, - cache: "no-cache", - }), - ); - } - }; - - useEffect(() => { - handleData(); - }, [followState]); + const { data } = useQuery({ + queryKey: ["followData", followState], + queryFn: async () => { + const res = httpClient.get(`users/${userId}/${followState}`, { + headers: { Authorization: ACCESS_TOKEN }, + cache: "no-cache", + }); + return res; + }, + }); const handleClose = () => setIsModalState(false); return ( <> - {followData !== undefined && isModalState && ( + {data !== undefined && isModalState && (

nickname님{followState === "followees" ? "이" : "을"} 팔로우 하는 유저

- {followData.list.length < 1 ? ( + {data.list.length < 1 ? (
팔로우하는 유저가 없어요
) : ( - + )}
diff --git a/src/app/(userpage)/user/[userId]/components/MyProfileButton/MyProfileButton.module.scss b/src/app/(userpage)/user/[userId]/components/MyProfileButton/MyProfileButton.module.scss new file mode 100644 index 0000000..69c7247 --- /dev/null +++ b/src/app/(userpage)/user/[userId]/components/MyProfileButton/MyProfileButton.module.scss @@ -0,0 +1,9 @@ +@import "@/styles/_index"; +@import "@/styles/_media"; + +.container { + display: flex; + flex-direction: column; + gap: 20px; + width: 100%; +} \ No newline at end of file diff --git a/src/app/(userpage)/user/[userId]/components/MyProfileButton/MyProfileButton.tsx b/src/app/(userpage)/user/[userId]/components/MyProfileButton/MyProfileButton.tsx new file mode 100644 index 0000000..ac99e00 --- /dev/null +++ b/src/app/(userpage)/user/[userId]/components/MyProfileButton/MyProfileButton.tsx @@ -0,0 +1,28 @@ +import React, { useState } from "react"; +import Button from "@/components/Button/Button"; +import Modal from "@/components/Modal/Modal"; +import cn from "@/utils/classNames"; +import styles from "./MyProfileButton.module.scss"; + +export default function MyProfileButton() { + const [isModal, setIsModal] = useState(false); + const handleClose = () => setIsModal(false); + const handleOpen = () => setIsModal(true); + + return ( +
+ {isModal && ( + +
모달 테스트
+
+ )} + + +
+ ); +} diff --git a/src/app/(userpage)/user/[userId]/components/UserInfo/UserInfo.module.scss b/src/app/(userpage)/user/[userId]/components/UserInfo/UserInfo.module.scss index 09a6d50..a307528 100644 --- a/src/app/(userpage)/user/[userId]/components/UserInfo/UserInfo.module.scss +++ b/src/app/(userpage)/user/[userId]/components/UserInfo/UserInfo.module.scss @@ -92,3 +92,15 @@ width: 194px; } } + +.profile { + width: 250px; + + @include respond-to(tablet) { + width: 80%; + } + + @include respond-to(mobile) { + width: 245px; + } +} diff --git a/src/app/(userpage)/user/[userId]/components/UserInfo/UserInfo.tsx b/src/app/(userpage)/user/[userId]/components/UserInfo/UserInfo.tsx index 72bf4af..1564026 100644 --- a/src/app/(userpage)/user/[userId]/components/UserInfo/UserInfo.tsx +++ b/src/app/(userpage)/user/[userId]/components/UserInfo/UserInfo.tsx @@ -1,6 +1,7 @@ /* eslint-disable import/no-named-as-default */ /* eslint-disable jsx-a11y/no-static-element-interactions */ /* eslint-disable jsx-a11y/click-events-have-key-events */ +import { useSession } from "next-auth/react"; import React, { useState } from "react"; import Button from "@/components/Button/Button"; import { UserImage } from "@/components/UserImage"; @@ -9,8 +10,11 @@ import styles from "./UserInfo.module.scss"; import FollowModal from "../FollowModal/FollowModal"; // eslint-disable-next-line no-restricted-imports import HTMLContent from "../HTMLContent/HTMLContent"; +// eslint-disable-next-line no-restricted-imports +import MyProfileButton from "../MyProfileButton/MyProfileButton"; type UserInfoProps = { + userId: number; nickname: string; image: string; description: string; @@ -19,11 +23,21 @@ type UserInfoProps = { isfollow: boolean; }; -export default function UserInfo({ nickname, image, description, follower, folloing, isfollow }: UserInfoProps) { - // textarea에서 쓴 줄바꿈 변환해서 서버로 보내기 - // const formattedDescription = description.replace(/\n/g, "
") +export default function UserInfo({ + userId, + nickname, + image, + description, + follower, + folloing, + isfollow, +}: UserInfoProps) { const [isModalOpen, setIsModalOpen] = useState(false); const [followModalProps, setFollowModalProps] = useState(""); + const { data: session } = useSession(); + const loginUser = session?.user.id; + + console.log(loginUser, userId); const handelFolloweesModal = () => { setFollowModalProps("followees"); @@ -62,22 +76,28 @@ export default function UserInfo({ nickname, image, description, follower, follo

팔로잉

- {isfollow ? ( - + {Number(userId) === loginUser ? ( + ) : ( - +
+ {isfollow ? ( + + ) : ( + + )} +
)} diff --git a/src/app/(userpage)/user/[userId]/page.tsx b/src/app/(userpage)/user/[userId]/page.tsx index 755f933..3a49a2b 100644 --- a/src/app/(userpage)/user/[userId]/page.tsx +++ b/src/app/(userpage)/user/[userId]/page.tsx @@ -2,13 +2,11 @@ /* eslint-disable no-restricted-imports */ +import { useQuery } from "@tanstack/react-query"; import { useSession } from "next-auth/react"; -import React, { useEffect, useState } from "react"; -// user mock data -// import { userMock } from "@/app/(userpage)/userMock"; +import React from "react"; import Activity from "@/components/Card/Activity/Activity"; import cn from "@/utils/classNames"; -// 추후 데이터 연결시 받아온데이터로 변환 예정 import HttpClient from "@/utils/httpClient"; import UserActivityList from "./components/UserActivityList/UserActivityList"; import UserInfo from "./components/UserInfo/UserInfo"; @@ -17,37 +15,33 @@ import { UserDetail } from "../../types"; export default function UserPage({ params }: { params: { userId: number } }) { const { data: session } = useSession(); - const [userData, setUserData] = useState(); + const ACCESS_TOKEN = session?.accessToken; const httpClient = new HttpClient(process.env.NEXT_PUBLIC_BASE_URL!); - const getUserData = async () => { - if (session) { - const ACCESS_TOKEN = session.accessToken; - setUserData( - await httpClient.get(`users/${params.userId}`, { - headers: { Authorization: ACCESS_TOKEN }, - cache: "no-cache", - }), - ); - } - }; - - useEffect(() => { - getUserData(); - }, []); + const { data } = useQuery({ + queryKey: ["userData", params.userId], + queryFn: async () => { + const res = httpClient.get(`users/${params.userId}`, { + headers: { Authorization: ACCESS_TOKEN ?? "" }, + cache: "no-cache", + }); + return res; + }, + }); return (
- {userData && ( + {data && ( <>
@@ -55,15 +49,15 @@ export default function UserPage({ params }: { params: { userId: number } }) {
diff --git a/src/components/Button/Button.module.scss b/src/components/Button/Button.module.scss index e48ab8b..368adef 100644 --- a/src/components/Button/Button.module.scss +++ b/src/components/Button/Button.module.scss @@ -54,15 +54,3 @@ border: 1px solid $gray-300; } } - -.profile { - width: 250px; - - @include respond-to(tablet) { - width: 400px; - } - - @include respond-to(mobile) { - width: 245px; - } -} From 67f1433b899a555d17c20ac54ef7221ade64f80d Mon Sep 17 00:00:00 2001 From: yeeZinu Date: Mon, 17 Jun 2024 16:20:26 +0900 Subject: [PATCH 05/11] =?UTF-8?q?feat:=20=EB=AC=B4=ED=95=9C=EC=8A=A4?= =?UTF-8?q?=ED=81=AC=EB=A1=A4=20=EA=B5=AC=ED=98=84=20=EB=B0=8F=20=EC=9E=A1?= =?UTF-8?q?=EB=8B=A4=ED=95=9C=20=EC=97=90=EB=9F=AC=20=EC=88=98=EC=A0=95(#3?= =?UTF-8?q?5)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../_components/SignInForm/SignInForm.tsx | 2 +- .../MyProfileButton.module.scss | 8 +++- .../MyProfileButton/MyProfileButton.tsx | 8 +++- .../UserActivityList/UserActivityList.tsx | 40 ++++++++++++++----- .../components/UserInfo/UserInfo.module.scss | 2 +- .../[userId]/components/UserInfo/UserInfo.tsx | 2 - .../UserProductList/UserProductList.tsx | 6 ++- .../Card/Activity/Activity.module.scss | 3 +- src/components/Gnb/Gnb.tsx | 2 +- 9 files changed, 52 insertions(+), 21 deletions(-) diff --git a/src/app/(auth)/signin/_components/SignInForm/SignInForm.tsx b/src/app/(auth)/signin/_components/SignInForm/SignInForm.tsx index ccddbf5..4ae2ba5 100644 --- a/src/app/(auth)/signin/_components/SignInForm/SignInForm.tsx +++ b/src/app/(auth)/signin/_components/SignInForm/SignInForm.tsx @@ -26,7 +26,7 @@ export default function SignInForm() { const router = useRouter(); const onSubmit = async (data: SignInFormData) => { - const result = await signIn("credentials", { + const result = await signIn("signin", { redirect: false, email: data.email, password: data.password, diff --git a/src/app/(userpage)/user/[userId]/components/MyProfileButton/MyProfileButton.module.scss b/src/app/(userpage)/user/[userId]/components/MyProfileButton/MyProfileButton.module.scss index 69c7247..54b0e50 100644 --- a/src/app/(userpage)/user/[userId]/components/MyProfileButton/MyProfileButton.module.scss +++ b/src/app/(userpage)/user/[userId]/components/MyProfileButton/MyProfileButton.module.scss @@ -4,6 +4,12 @@ .container { display: flex; flex-direction: column; + align-items: center; + justify-content: center; gap: 20px; width: 100%; -} \ No newline at end of file +} + +.profile { + width: 80%; +} diff --git a/src/app/(userpage)/user/[userId]/components/MyProfileButton/MyProfileButton.tsx b/src/app/(userpage)/user/[userId]/components/MyProfileButton/MyProfileButton.tsx index ac99e00..5c26a42 100644 --- a/src/app/(userpage)/user/[userId]/components/MyProfileButton/MyProfileButton.tsx +++ b/src/app/(userpage)/user/[userId]/components/MyProfileButton/MyProfileButton.tsx @@ -19,10 +19,16 @@ export default function MyProfileButton() { - +
); } diff --git a/src/app/(userpage)/user/[userId]/components/UserActivityList/UserActivityList.tsx b/src/app/(userpage)/user/[userId]/components/UserActivityList/UserActivityList.tsx index 5b1bbe7..4e54b51 100644 --- a/src/app/(userpage)/user/[userId]/components/UserActivityList/UserActivityList.tsx +++ b/src/app/(userpage)/user/[userId]/components/UserActivityList/UserActivityList.tsx @@ -2,10 +2,11 @@ import { useInfiniteQuery } from "@tanstack/react-query"; import { useSession } from "next-auth/react"; import React, { useEffect, useState } from "react"; import { useForm } from "react-hook-form"; -import { productMock } from "@/app/(userpage)/productMock"; +import { useInView } from "react-intersection-observer"; import { Dropdown } from "@/components/Dropdown"; import { ORDER, DROPDOWN } from "@/components/Dropdown/constants"; import useWindowSize from "@/hooks/useWindowSize"; +import { ProductType, ProductsResponseType } from "@/types/global"; import cn from "@/utils/classNames"; import HttpClient from "@/utils/httpClient"; import styles from "./UserActivityList.module.scss"; @@ -20,31 +21,45 @@ export default function UserActivityList() { const { width } = useWindowSize(); const { control, watch } = useForm({ mode: "onBlur" }); + const { ref, inView } = useInView({ + threshold: 0.5, + }); + const httpClient = new HttpClient(process.env.NEXT_PUBLIC_BASE_URL!); const userId = session?.user.id; const ACCESS_TOKEN = session?.accessToken ?? ""; - const { data } = useInfiniteQuery({ + const { + data: userProductData, + fetchNextPage, + hasNextPage, + } = useInfiniteQuery({ queryKey: ["userProductData", selectedButton], queryFn: async ({ pageParam }) => { - const res = await httpClient.get(`users/${userId}/${selectedButton}-products?cursor=${pageParam}`, { - headers: { Authorization: ACCESS_TOKEN }, - cache: "no-cache", - }); + const res = await httpClient.get( + `users/${userId}/${selectedButton}-products?cursor=${pageParam}`, + { + headers: { Authorization: ACCESS_TOKEN }, + cache: "no-cache", + }, + ); return res; }, + select: (data): ProductType[] => data.pages.map((page) => page.list).flat(), initialPageParam: 0, getNextPageParam: (lastPage) => lastPage.nextCursor ?? undefined, }); - console.log("select", selectedButton, data); - useEffect(() => { if (watch("select") !== undefined) { setSelectedButton(watch("select")); } setSelectedButton("reviewed"); - }, [watch("select")]); + + if (inView && hasNextPage) { + fetchNextPage(); + } + }, [inView, fetchNextPage, hasNextPage, watch("select")]); const onSelectButtonHandler = (value: string) => { setSelectedButton(value); @@ -68,7 +83,12 @@ export default function UserActivityList() { />
)} - + {userProductData && ( + + )} ); } diff --git a/src/app/(userpage)/user/[userId]/components/UserInfo/UserInfo.module.scss b/src/app/(userpage)/user/[userId]/components/UserInfo/UserInfo.module.scss index a307528..9f84839 100644 --- a/src/app/(userpage)/user/[userId]/components/UserInfo/UserInfo.module.scss +++ b/src/app/(userpage)/user/[userId]/components/UserInfo/UserInfo.module.scss @@ -94,7 +94,7 @@ } .profile { - width: 250px; + width: 100%; @include respond-to(tablet) { width: 80%; diff --git a/src/app/(userpage)/user/[userId]/components/UserInfo/UserInfo.tsx b/src/app/(userpage)/user/[userId]/components/UserInfo/UserInfo.tsx index 1564026..20a0ced 100644 --- a/src/app/(userpage)/user/[userId]/components/UserInfo/UserInfo.tsx +++ b/src/app/(userpage)/user/[userId]/components/UserInfo/UserInfo.tsx @@ -37,8 +37,6 @@ export default function UserInfo({ const { data: session } = useSession(); const loginUser = session?.user.id; - console.log(loginUser, userId); - const handelFolloweesModal = () => { setFollowModalProps("followees"); setIsModalOpen(true); diff --git a/src/app/(userpage)/user/[userId]/components/UserProductList/UserProductList.tsx b/src/app/(userpage)/user/[userId]/components/UserProductList/UserProductList.tsx index 00accf4..69e2607 100644 --- a/src/app/(userpage)/user/[userId]/components/UserProductList/UserProductList.tsx +++ b/src/app/(userpage)/user/[userId]/components/UserProductList/UserProductList.tsx @@ -6,17 +6,19 @@ import type { ProductType } from "@/types/global"; type ProductListProps = { list: ProductType[]; + lastRef: () => void; }; -export default function UserProductList({ list }: ProductListProps) { +export default function UserProductList({ list, lastRef }: ProductListProps) { return (
- {list.map((item) => ( + {list.map((item, idx) => ( +
))}
diff --git a/src/components/Card/Activity/Activity.module.scss b/src/components/Card/Activity/Activity.module.scss index 7528556..cf4f196 100644 --- a/src/components/Card/Activity/Activity.module.scss +++ b/src/components/Card/Activity/Activity.module.scss @@ -46,11 +46,10 @@ .title { gap: 5px; - width: 91px; + width: 92px; color: $gray-100; text-align: center; - @include text-normal; @include respond-to(tablet) { diff --git a/src/components/Gnb/Gnb.tsx b/src/components/Gnb/Gnb.tsx index 07fe35f..f977895 100644 --- a/src/components/Gnb/Gnb.tsx +++ b/src/components/Gnb/Gnb.tsx @@ -77,7 +77,7 @@ export default function Gnb({ initialSession }: GnbProps) { {currentSession ? ( <> 비교하기 - 내 프로필 + 내 프로필 ) : ( <> From 00c1fca1f08497bedc9fce51d85626040dd19b60 Mon Sep 17 00:00:00 2001 From: yeeZinu Date: Mon, 17 Jun 2024 16:27:00 +0900 Subject: [PATCH 06/11] =?UTF-8?q?style:=20=EB=8B=A4=EB=A5=B8=EC=82=AC?= =?UTF-8?q?=EB=9E=8C=20=ED=94=84=EB=A1=9C=ED=95=84=20=ED=8C=94=EB=A1=9C?= =?UTF-8?q?=EC=9A=B0=20=EC=8A=A4=ED=83=80=EC=9D=BC=20=EC=88=98=EC=A0=95(#3?= =?UTF-8?q?5)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../AlertModal/AlertModal.module.scss | 2 +- .../OauthSignInBox/OauthSignInBox.module.scss | 3 ++- .../OauthSignInButton.module.scss | 9 +++++---- .../SignInForm/SignInForm.module.scss | 2 ++ .../SignUpForm/SignUpForm.module.scss | 2 ++ .../MyProfileButton.module.scss | 2 +- .../components/UserInfo/UserInfo.module.scss | 7 +++++++ .../[userId]/components/UserInfo/UserInfo.tsx | 2 +- .../Upload/Cropper/CropperModal.module.scss | 11 ++++------ .../Upload/Cropper/ImageCropper.module.scss | 20 +++++++++++-------- src/styles/_common.scss | 2 +- 11 files changed, 38 insertions(+), 24 deletions(-) diff --git a/src/app/(auth)/_components/AlertModal/AlertModal.module.scss b/src/app/(auth)/_components/AlertModal/AlertModal.module.scss index 00690b4..980f5c1 100644 --- a/src/app/(auth)/_components/AlertModal/AlertModal.module.scss +++ b/src/app/(auth)/_components/AlertModal/AlertModal.module.scss @@ -5,8 +5,8 @@ display: flex; flex-direction: column; gap: 40px; - padding: 40px; width: 360px; + padding: 40px; @include respond-to(mobile) { width: minmax(320px, calc(100% - 40px)); diff --git a/src/app/(auth)/signin/_components/OauthSignInBox/OauthSignInBox.module.scss b/src/app/(auth)/signin/_components/OauthSignInBox/OauthSignInBox.module.scss index fd58638..b5f6358 100644 --- a/src/app/(auth)/signin/_components/OauthSignInBox/OauthSignInBox.module.scss +++ b/src/app/(auth)/signin/_components/OauthSignInBox/OauthSignInBox.module.scss @@ -4,12 +4,13 @@ .container { display: flex; flex-direction: column; - align-items: center; gap: 20px; + align-items: center; width: 100%; .title { color: $gray-200; + @include font-normal; @include text-normal; diff --git a/src/app/(auth)/signin/_components/OauthSignInButton/OauthSignInButton.module.scss b/src/app/(auth)/signin/_components/OauthSignInButton/OauthSignInButton.module.scss index 5a1d5b9..f76e456 100644 --- a/src/app/(auth)/signin/_components/OauthSignInButton/OauthSignInButton.module.scss +++ b/src/app/(auth)/signin/_components/OauthSignInButton/OauthSignInButton.module.scss @@ -1,12 +1,13 @@ @import "@/styles/_index"; .container { - width: 56px; - height: 56px; display: flex; - justify-content: center; align-items: center; - @include rounded-full; + justify-content: center; + width: 56px; + height: 56px; background-color: transparent; border: 1px solid $gray-300; + + @include rounded-full; } diff --git a/src/app/(auth)/signin/_components/SignInForm/SignInForm.module.scss b/src/app/(auth)/signin/_components/SignInForm/SignInForm.module.scss index 632330e..ac724ad 100644 --- a/src/app/(auth)/signin/_components/SignInForm/SignInForm.module.scss +++ b/src/app/(auth)/signin/_components/SignInForm/SignInForm.module.scss @@ -36,10 +36,12 @@ .signInButton { width: auto; padding: 21px; + @include text-lg; @include respond-to(tablet) { @include text-normal; + padding: 18px; } } diff --git a/src/app/(auth)/signup/_components/SignUpForm/SignUpForm.module.scss b/src/app/(auth)/signup/_components/SignUpForm/SignUpForm.module.scss index 740bd96..e0ce520 100644 --- a/src/app/(auth)/signup/_components/SignUpForm/SignUpForm.module.scss +++ b/src/app/(auth)/signup/_components/SignUpForm/SignUpForm.module.scss @@ -36,10 +36,12 @@ .signUpButton { width: auto; padding: 21px; + @include text-lg; @include respond-to(tablet) { @include text-normal; + padding: 18px; } } diff --git a/src/app/(userpage)/user/[userId]/components/MyProfileButton/MyProfileButton.module.scss b/src/app/(userpage)/user/[userId]/components/MyProfileButton/MyProfileButton.module.scss index 54b0e50..2febfdd 100644 --- a/src/app/(userpage)/user/[userId]/components/MyProfileButton/MyProfileButton.module.scss +++ b/src/app/(userpage)/user/[userId]/components/MyProfileButton/MyProfileButton.module.scss @@ -4,9 +4,9 @@ .container { display: flex; flex-direction: column; + gap: 20px; align-items: center; justify-content: center; - gap: 20px; width: 100%; } diff --git a/src/app/(userpage)/user/[userId]/components/UserInfo/UserInfo.module.scss b/src/app/(userpage)/user/[userId]/components/UserInfo/UserInfo.module.scss index 9f84839..726947c 100644 --- a/src/app/(userpage)/user/[userId]/components/UserInfo/UserInfo.module.scss +++ b/src/app/(userpage)/user/[userId]/components/UserInfo/UserInfo.module.scss @@ -93,6 +93,13 @@ } } +.followButton{ + display: flex; + align-items: center; + justify-content: center; + width: 100%; +} + .profile { width: 100%; diff --git a/src/app/(userpage)/user/[userId]/components/UserInfo/UserInfo.tsx b/src/app/(userpage)/user/[userId]/components/UserInfo/UserInfo.tsx index 20a0ced..1691b12 100644 --- a/src/app/(userpage)/user/[userId]/components/UserInfo/UserInfo.tsx +++ b/src/app/(userpage)/user/[userId]/components/UserInfo/UserInfo.tsx @@ -77,7 +77,7 @@ export default function UserInfo({ {Number(userId) === loginUser ? ( ) : ( -
+
{isfollow ? (
)} From 944a439fb825429807128e7eaf5e4679ca4bd450 Mon Sep 17 00:00:00 2001 From: yeeZinu Date: Wed, 19 Jun 2024 17:13:49 +0900 Subject: [PATCH 08/11] =?UTF-8?q?bug:=20=EB=AA=A8=EB=B0=94=EC=9D=BC=20?= =?UTF-8?q?=ED=99=94=EB=A9=B4=20=EC=A0=84=ED=99=98=EC=8B=9C=20=ED=98=84?= =?UTF-8?q?=EC=9E=AC=20=EC=84=A0=ED=83=9D=EB=90=9C=20=EB=B2=84=ED=8A=BC=20?= =?UTF-8?q?=EC=83=81=ED=83=9C=20=EC=9C=A0=EC=8B=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../components/UserActivityList/UserActivityList.tsx | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/app/(userpage)/user/[userId]/components/UserActivityList/UserActivityList.tsx b/src/app/(userpage)/user/[userId]/components/UserActivityList/UserActivityList.tsx index fe3b761..f4e14cc 100644 --- a/src/app/(userpage)/user/[userId]/components/UserActivityList/UserActivityList.tsx +++ b/src/app/(userpage)/user/[userId]/components/UserActivityList/UserActivityList.tsx @@ -62,9 +62,15 @@ export default function UserActivityList() { }); const selectTab = ORDER.PROFILE.filter((i) => i.value === selectedButton); + console.log("selectedButton", typeof selectedButton); + + console.log("selectTab", width, selectTab); useEffect(() => { - if (watch("select") !== undefined) { + if (width <= 1023 && watch("select") === undefined) { + setSelectedButton("reviewed"); + } + if (width <= 1023 && watch("select") !== undefined) { setSelectedButton(watch("select")); } From b2ccaf0a786d719da6ad92556478eb5a526d5e41 Mon Sep 17 00:00:00 2001 From: yeeZinu Date: Wed, 19 Jun 2024 18:02:16 +0900 Subject: [PATCH 09/11] =?UTF-8?q?fix:=20=EB=AA=A8=EB=B0=94=EC=9D=BC=20?= =?UTF-8?q?=ED=99=94=EB=A9=B4=20=EC=A0=84=ED=99=98=EC=8B=9C=20=ED=98=84?= =?UTF-8?q?=EC=9E=AC=20=EC=84=A0=ED=83=9D=EB=90=9C=20=EB=B2=84=ED=8A=BC=20?= =?UTF-8?q?=EC=83=81=ED=83=9C=20=EC=9C=A0=EC=8B=A4(#35)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../UserActivityList/UserActivityList.tsx | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/src/app/(userpage)/user/[userId]/components/UserActivityList/UserActivityList.tsx b/src/app/(userpage)/user/[userId]/components/UserActivityList/UserActivityList.tsx index f4e14cc..94a79ed 100644 --- a/src/app/(userpage)/user/[userId]/components/UserActivityList/UserActivityList.tsx +++ b/src/app/(userpage)/user/[userId]/components/UserActivityList/UserActivityList.tsx @@ -61,24 +61,29 @@ export default function UserActivityList() { getNextPageParam: (lastPage) => lastPage.nextCursor ?? undefined, }); - const selectTab = ORDER.PROFILE.filter((i) => i.value === selectedButton); - console.log("selectedButton", typeof selectedButton); + const selectTab = ORDER.PROFILE.filter((i) => i.value === selectedButton) ?? "reviewed"; + console.log("selectedButton", selectedButton); console.log("selectTab", width, selectTab); + console.log("watch(select)", watch("select")); + useEffect(() => { - if (width <= 1023 && watch("select") === undefined) { + if (width <= 1023 && watch("select") === "") { setSelectedButton("reviewed"); } - if (width <= 1023 && watch("select") !== undefined) { + if (width <= 1023 && watch("select") !== "") { setSelectedButton(watch("select")); } + router.push(`${userId}/?${querySelectButton(selectedButton)}`); + }, [selectedButton, watch("select")]); + + useEffect(() => { if (inView && hasNextPage) { fetchNextPage(); } - router.push(`${userId}/?${querySelectButton(selectedButton)}`); - }, [inView, fetchNextPage, hasNextPage, watch("select"), selectedButton]); + }, [inView, fetchNextPage, hasNextPage]); const onSelectButtonHandler = (value: string) => { setSelectedButton(value); From cc4048ecd90ddba5fd2813983dbf623bc8ef4e5f Mon Sep 17 00:00:00 2001 From: yeeZinu Date: Wed, 19 Jun 2024 18:06:29 +0900 Subject: [PATCH 10/11] =?UTF-8?q?fix:=20log=20=EC=A0=9C=EA=B1=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../components/UserActivityList/UserActivityList.tsx | 5 ----- 1 file changed, 5 deletions(-) diff --git a/src/app/(userpage)/user/[userId]/components/UserActivityList/UserActivityList.tsx b/src/app/(userpage)/user/[userId]/components/UserActivityList/UserActivityList.tsx index 94a79ed..0c38c0e 100644 --- a/src/app/(userpage)/user/[userId]/components/UserActivityList/UserActivityList.tsx +++ b/src/app/(userpage)/user/[userId]/components/UserActivityList/UserActivityList.tsx @@ -62,11 +62,6 @@ export default function UserActivityList() { }); const selectTab = ORDER.PROFILE.filter((i) => i.value === selectedButton) ?? "reviewed"; - console.log("selectedButton", selectedButton); - - console.log("selectTab", width, selectTab); - - console.log("watch(select)", watch("select")); useEffect(() => { if (width <= 1023 && watch("select") === "") { From 3cbf627e9536c13fbd2e03a18fec982005349cd3 Mon Sep 17 00:00:00 2001 From: yeeZinu Date: Wed, 19 Jun 2024 18:07:01 +0900 Subject: [PATCH 11/11] style: stylelint --- .../_components/OauthSignUpForm/OauthSignUpForm.module.scss | 2 ++ src/app/compare/input/CompareInput.module.scss | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/src/app/(auth)/oauth/signup/[provider]/_components/OauthSignUpForm/OauthSignUpForm.module.scss b/src/app/(auth)/oauth/signup/[provider]/_components/OauthSignUpForm/OauthSignUpForm.module.scss index 13a9ec0..4a811c1 100644 --- a/src/app/(auth)/oauth/signup/[provider]/_components/OauthSignUpForm/OauthSignUpForm.module.scss +++ b/src/app/(auth)/oauth/signup/[provider]/_components/OauthSignUpForm/OauthSignUpForm.module.scss @@ -9,10 +9,12 @@ .button { width: auto; padding: 21px; + @include text-lg; @include respond-to(tablet) { @include text-normal; + padding: 18px; } } diff --git a/src/app/compare/input/CompareInput.module.scss b/src/app/compare/input/CompareInput.module.scss index 0f4d25c..61458f9 100644 --- a/src/app/compare/input/CompareInput.module.scss +++ b/src/app/compare/input/CompareInput.module.scss @@ -138,6 +138,6 @@ .buttonDisabled { color: $white-100; - background: $gray-200; cursor: not-allowed; + background: $gray-200; }