From a1f16a62fb89d3301bb0a3c156db451c274879f2 Mon Sep 17 00:00:00 2001 From: HeeNamgoong Date: Thu, 30 May 2024 02:01:07 +0900 Subject: [PATCH] Feat: add div when no tag image #145 --- src/pages/MainPage.js | 19 ++++++++++++++++--- 1 file changed, 16 insertions(+), 3 deletions(-) diff --git a/src/pages/MainPage.js b/src/pages/MainPage.js index 76c8763..3753318 100644 --- a/src/pages/MainPage.js +++ b/src/pages/MainPage.js @@ -12,8 +12,7 @@ import BottomNav from "../layout/BottomNav"; import axios from "axios"; const MainPage = () => { - //db에서 get 해온 username or recoil에 저장한 내 정보 - const dummyName = "^get예정^"; + const [userName, setUserName] = useRecoilState(userNameState); const [dialog, setDialog] = useRecoilState(dialogState); @@ -85,7 +84,11 @@ const MainPage = () => { 태그 별 사진 보기 - + {tagNames.length === 0 ? ( + 일기를 추가해보세요! + ) : ( + + )} @@ -237,4 +240,14 @@ const UpTDiv = styled.div` padding-right: 1rem; `; +const NoTagsDiv = styled.div` + ${SharedContent}; + font-size: 1.2rem; + color: ${COLOR.MAIN_GREEN}; + font-family: var(--pretendard-medium); + border-radius: 1rem; + color: #e4e4e4; + font-size: 2rem; +`; + export default MainPage;