From 2ff105647b6e3c52215deaad296af690df1c37db Mon Sep 17 00:00:00 2001 From: J'aimemin <61978339+Kim-Jaemin420@users.noreply.github.com> Date: Fri, 9 Feb 2024 15:33:19 +0900 Subject: [PATCH] =?UTF-8?q?[#134]=20Feat:=20=EB=8D=B0=EC=9D=B4=ED=84=B0=20?= =?UTF-8?q?=EC=97=86=EB=8A=94=20=EA=B2=BD=EC=9A=B0=20UI=20=EA=B5=AC?= =?UTF-8?q?=ED=98=84=20(#135)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/pages/MainPage.tsx | 22 ++++++++++++++++++++++ src/pages/MyActivityPage.tsx | 28 ++++++++++++++++++++++++++++ src/pages/MyPage.tsx | 22 +++++++++++++++++----- src/pages/UserPage.tsx | 25 +++++++++++++++++++++++++ 4 files changed, 92 insertions(+), 5 deletions(-) diff --git a/src/pages/MainPage.tsx b/src/pages/MainPage.tsx index 208c921..f1af6cb 100644 --- a/src/pages/MainPage.tsx +++ b/src/pages/MainPage.tsx @@ -61,9 +61,21 @@ const MainPage = () => { + {!isPending && tteokguks.length === 0 && ( +
+
현재 응원을 요청하는 떡국이 없어요.
+
나만의 떡국을 만들고, 다른 사람들과 재료를 나눠보세요.
+
+ )}
+ {!isPending && tteokguks.length === 0 && ( +
+
아직 만들어진 떡국이 없어요.
+
도움이 필요한 떡국들에게 재료를 나눠주세요.
+
+ )}
@@ -148,4 +160,14 @@ const styles = { isFetchingLoading: css({ width: "50%", }), + noTteokguk: css({ + textAlign: "center", + marginTop: "1.6rem", + fontSize: "1.4rem", + }), + noTteokgukTitle: css({ + fontSize: "1.6rem", + fontWeight: 700, + marginBottom: "0.8rem", + }), }; diff --git a/src/pages/MyActivityPage.tsx b/src/pages/MyActivityPage.tsx index 159e338..9b6e48e 100644 --- a/src/pages/MyActivityPage.tsx +++ b/src/pages/MyActivityPage.tsx @@ -58,11 +58,29 @@ const MyActivityPage = () => { + {!isPending && receivedIngredientList?.length === 0 && ( +
+
친구들에게 떡국 재료를 요청해보세요.
+
+
내 떡국 주소를 친구들에게 공유하고,
+ 친구들에게 도움을 요청해보세요! +
+
+ )} {receivedIngredientList && ( )}
+ {!isPending && mySupportedTteokguks?.length === 0 && ( +
+
아직 응원하신 떡국이 없어요.
+
+
메인페이지나 랜덤방문을 통해 다른 사람들에게
응원의 재료를 + 전달해보세요! +
+
+ )} {mySupportedTteokguks && ( )} @@ -130,4 +148,14 @@ const styles = { gap: "1.6rem", width: "100%", }), + noTteokguk: css({ + textAlign: "center", + marginTop: "1.6rem", + fontSize: "1.4rem", + }), + noTteokgukTitle: css({ + fontSize: "1.6rem", + fontWeight: 700, + marginBottom: "0.8rem", + }), }; diff --git a/src/pages/MyPage.tsx b/src/pages/MyPage.tsx index a59b07d..0781bc6 100644 --- a/src/pages/MyPage.tsx +++ b/src/pages/MyPage.tsx @@ -12,11 +12,7 @@ import ErrorFallbackPage from "./ErrorFallbackPage"; import { Link } from "@/routes/Link"; import useRouter from "@/routes/useRouter"; -import { - $getMyDetails, - $getRandomUserDetails, - $deleteLoggedInUser, -} from "@/store/user"; +import { $getMyDetails, $getRandomUserDetails, $deleteLoggedInUser } from "@/store/user"; import { INGREDIENT_ICON_BY_KEY } from "@/constants/ingredient"; import Header from "@/components/common/Header"; import IconButton from "@/components/common/IconButton"; @@ -178,6 +174,12 @@ const MyPage = () => { + {!isPending && tteokguks.length === 0 && ( +
+
아직 만든 떡국이 없어요.
+
소원 떡국 만들기 버튼을 클릭하여 새 떡국을 만들어보세요.
+
+ )}
@@ -284,4 +286,14 @@ const styles = { fontSize: "1.4rem", marginY: "1.6rem", }), + noTteokguk: css({ + textAlign: "center", + marginTop: "1.6rem", + fontSize: "1.4rem", + }), + noTteokgukTitle: css({ + fontSize: "1.6rem", + fontWeight: 700, + marginBottom: "0.8rem", + }), }; diff --git a/src/pages/UserPage.tsx b/src/pages/UserPage.tsx index ab095fc..563a2e8 100644 --- a/src/pages/UserPage.tsx +++ b/src/pages/UserPage.tsx @@ -15,6 +15,7 @@ import UserProfileSection from "@/components/common/UserProfileSection"; import TteokgukList from "@/components/common/TteokgukList"; import { $getRandomUserDetails, $getUserDetail } from "@/store/user"; import VisitIcon from "@/assets/svg/visit.svg"; +import notFound from "@/assets/images/not-found.png"; const UserPage = () => { const { id } = useParams(); @@ -81,6 +82,13 @@ const UserPage = () => {
사용자님의 소원 떡국 리스트
+ {!isPending && tteokguks.length === 0 && ( +
+
아직 만든 떡국이 없어요.
+
랜덤 방문을 통해 떡국을 만든 사용자를 찾아보세요.
+ 데이터 없음 +
+ )}
@@ -114,4 +122,21 @@ const styles = { rowGap: "1.2rem", marginTop: "1.2rem", }), + noTteokguk: css({ + display: "flex", + flexFlow: "column wrap", + justifyContent: "center", + alignItems: "center", + textAlign: "center", + marginTop: "1.6rem", + fontSize: "1.4rem", + }), + noTteokgukTitle: css({ + fontSize: "1.6rem", + fontWeight: 700, + marginBottom: "0.8rem", + }), + notFound: css({ + marginTop: "1.6rem", + }), };