Skip to content

Commit

Permalink
Merge pull request #332 from LikeLion-at-DGU/dev
Browse files Browse the repository at this point in the history
🚀 Deploy
  • Loading branch information
Chaem03 authored Aug 5, 2024
2 parents af43ff4 + 5736819 commit 35b41e0
Show file tree
Hide file tree
Showing 6 changed files with 24 additions and 23 deletions.
4 changes: 3 additions & 1 deletion src/components/DateRangeCalendar/DateRangeCalendar.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
2 changes: 1 addition & 1 deletion src/components/GradientBackground/GradientBackground.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ const randomMove = keyframes`

const GradientBackgroundContainer = styled.div`
width: 100%;
height: 100%;
min-height: 100vh;
position: absolute;
top: 0;
left: 0;
Expand Down
8 changes: 5 additions & 3 deletions src/pages/MyPage/MyPage.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -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 ? (
Expand All @@ -68,10 +70,10 @@ const MyPage = () => {
</S.MypageWrapper>
<S.MypageWrapper>
<div className="MyStar">즐겨찾는 스타</div>
{myData.celebs.length === 0 ? (
{favoriteStars.length === 0 ? (
<div className="emptytext">챌린지를 시작해보세요!</div>
) : (
myData.celebs.map((item) => (
favoriteStars.map((item) => (
<MyStar
key={item.id}
src={item.photo}
Expand Down
6 changes: 4 additions & 2 deletions src/pages/MyPage/styled.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,9 @@ export const Layout = styled.div`
display: flex;
width: 100%;
font-size: 1.2rem;
border-bottom: 1px solid black;
text-align: center;
border-bottom: 1px solid #78a1b5;
padding-bottom: 1rem;
color: inherit;
font: inherit;
Expand Down Expand Up @@ -59,7 +61,7 @@ export const Layout = styled.div`
export const MypageWrapper = styled.div`
display: flex;
width: 100%;
gap: 10px;
gap: 5px;
flex-direction: column;
align-items: flex-start;
padding: 0 1.5rem;
Expand Down
25 changes: 10 additions & 15 deletions src/pages/RandomDice/RandomDice.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ import React, { useState, useEffect } from "react";
import * as S from "./styled";
import { Header } from "../../components/common/Header/Header";
import DiceBackground from "@/assets/DiceBackground.svg";
import star1 from "@/assets/star1.svg";
import GradientBackground from "@/components/GradientBackground/GradientBackground";
import { getRandomRoutine } from "@/apis/random";
import Modal from "@/components/Modal/Modal";
Expand All @@ -22,10 +21,16 @@ import { addHours } from "date-fns";

// 이미지 배열
const images = [
"https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcTy1Qh1wxZdS3QDFdjpSPK0FysKm0EHjxmsXg&s",
"https://i.namu.wiki/i/n2LztcrML9hzPww_iKNeMuh34vg48dkmZmGuMEC_e-DSpNoPGwch9nR9FZz9WfVx6nvv5aSDxqlxEG8iA9tcLQ.webp",
"https://www.dongguk.edu/resources/images/site/contents/img_ethic01.jpg",
star1,
"https://raw.githubusercontent.com/onlynyang/2024-Hackathon-4-STAR.T-Bakcend-images/main/celeb/entertainment/%EC%95%A0%EB%8B%88%EB%A9%94%EC%9D%B4%EC%85%98/%ED%96%84%EC%8B%9D%20-%20%EC%8A%88%ED%8D%BC%20%ED%9E%88%EC%96%B4%EB%A1%9C.jpg",
"https://raw.githubusercontent.com/onlynyang/2024-Hackathon-4-STAR.T-Bakcend-images/main/celeb/entertainment/%EB%B0%B0%EC%9A%B0/%EC%A0%9C%EC%8B%9C%EC%B9%B4%20%EB%B8%8C%EB%9D%BC%EC%9A%B4.jpg",
"https://raw.githubusercontent.com/onlynyang/2024-Hackathon-4-STAR.T-Bakcend-images/main/celeb/entertainment/%EB%B0%B0%EC%9A%B0/%EC%86%A1%ED%98%81.jpg",
"https://raw.githubusercontent.com/onlynyang/2024-Hackathon-4-STAR.T-Bakcend-images/main/celeb/%EA%B0%80%EC%88%98/%EB%9E%98%ED%8D%BC/%EB%8B%89%EC%8A%A4.jpg",
"https://raw.githubusercontent.com/onlynyang/2024-Hackathon-4-STAR.T-Bakcend-images/main/celeb/%EA%B0%80%EC%88%98/pop/%EB%A0%88%EC%98%A4%EB%82%98%EB%A5%B4%EB%8F%84%20%ED%81%AC%EB%A3%A8%EC%A6%88.jpg",
"https://raw.githubusercontent.com/onlynyang/2024-Hackathon-4-STAR.T-Bakcend-images/main/celeb/%EA%B0%80%EC%88%98/k-pop/%ED%95%9C%EA%B2%B0.jpg",
"https://raw.githubusercontent.com/onlynyang/2024-Hackathon-4-STAR.T-Bakcend-images/main/celeb/%EA%B0%80%EC%88%98/k-pop/%EC%82%AC%EB%9D%BC.jpg",
"https://raw.githubusercontent.com/onlynyang/2024-Hackathon-4-STAR.T-Bakcend-images/main/celeb/sports/%EC%95%BC%EA%B5%AC%EC%84%A0%EC%88%98/%EB%B0%95%EA%B1%B4%EC%B2%A0.jpg",
"https://raw.githubusercontent.com/onlynyang/2024-Hackathon-4-STAR.T-Bakcend-images/main/celeb/sports/%EB%86%8D%EA%B5%AC%EC%84%A0%EC%88%98/%EC%A0%9C%EC%9D%B4%ED%81%AC%20%EB%A1%9C%EB%B2%84%EC%B8%A0.jpg",
"https://raw.githubusercontent.com/onlynyang/2024-Hackathon-4-STAR.T-Bakcend-images/main/celeb/entertainment/%EC%95%A0%EB%8B%88%EB%A9%94%EC%9D%B4%EC%85%98/%EC%BC%84%ED%83%80%20-%20%EC%9D%B4%EC%A4%91%20%EC%83%9D%ED%99%9C.jpg",
];

export const RandomDice = () => {
Expand Down Expand Up @@ -123,10 +128,6 @@ export const RandomDice = () => {
setID(data.id);
};

const moveOnHome = () => {
console.log("홈으로 이동");
navigate("");
};
const textColor = !showContent ? "black" : "white";

return (
Expand Down Expand Up @@ -171,12 +172,6 @@ export const RandomDice = () => {
<button className="Again" onClick={handleAgainClick}>
다시 돌리기
</button>

{clickCalendarButton && (
<button className="moveOnHome" onClick={moveOnHome}>
처음으로
</button>
)}
</div>
)}
</S.Container>
Expand Down
2 changes: 1 addition & 1 deletion src/pages/RandomDice/styled.js
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 35b41e0

Please sign in to comment.