diff --git a/src/components/DateRangeCalendar/DateRangeCalendar.jsx b/src/components/DateRangeCalendar/DateRangeCalendar.jsx index 729cecd5..e011f603 100644 --- a/src/components/DateRangeCalendar/DateRangeCalendar.jsx +++ b/src/components/DateRangeCalendar/DateRangeCalendar.jsx @@ -119,7 +119,9 @@ const DateRangeCalendar = () => { setIsCalendarVisible(false); setIsCheckVisible(true); setTimeout(() => { - window.location.reload(); + if (window.location.href.includes("theme")) { + window.location.reload(); + } }, 2000); // } else { console.error("Failed to register routine:", response.statusText); diff --git a/src/components/GradientBackground/GradientBackground.jsx b/src/components/GradientBackground/GradientBackground.jsx index b0073230..cb8196b8 100644 --- a/src/components/GradientBackground/GradientBackground.jsx +++ b/src/components/GradientBackground/GradientBackground.jsx @@ -11,7 +11,7 @@ const randomMove = keyframes` const GradientBackgroundContainer = styled.div` width: 100%; - height: 100%; + min-height: 100vh; position: absolute; top: 0; left: 0; diff --git a/src/pages/MyPage/MyPage.jsx b/src/pages/MyPage/MyPage.jsx index ccba5315..49e8fa03 100644 --- a/src/pages/MyPage/MyPage.jsx +++ b/src/pages/MyPage/MyPage.jsx @@ -41,7 +41,9 @@ const MyPage = () => { const handleRoutineChangeClick = () => setRoutineVisible(true); const handleBackBtnClick = () => setIsPrivacyVisible(false); - + const favoriteStars = myData.celebs.filter( + (item) => item.routines_added_count > 0 + ); return ( <> {isPrivacyVisible ? ( @@ -68,10 +70,10 @@ const MyPage = () => {
즐겨찾는 스타
- {myData.celebs.length === 0 ? ( + {favoriteStars.length === 0 ? (
챌린지를 시작해보세요!
) : ( - myData.celebs.map((item) => ( + favoriteStars.map((item) => ( { @@ -123,10 +128,6 @@ export const RandomDice = () => { setID(data.id); }; - const moveOnHome = () => { - console.log("홈으로 이동"); - navigate(""); - }; const textColor = !showContent ? "black" : "white"; return ( @@ -171,12 +172,6 @@ export const RandomDice = () => { - - {clickCalendarButton && ( - - )} )} diff --git a/src/pages/RandomDice/styled.js b/src/pages/RandomDice/styled.js index 3954cbfc..a85ec3cc 100644 --- a/src/pages/RandomDice/styled.js +++ b/src/pages/RandomDice/styled.js @@ -19,7 +19,7 @@ export const Layout = styled.div` export const Container = styled.div` display: flex; - height: 100%; + min-height: 100vh; flex-direction: column; justify-content: center; align-items: center;