diff --git a/customfront/src/page/membership.jsx b/customfront/src/page/membership.jsx
index 82028c1d0..15a0452b4 100644
--- a/customfront/src/page/membership.jsx
+++ b/customfront/src/page/membership.jsx
@@ -1,5 +1,5 @@
import axios from "axios";
-import React, { useState } from "react";
+import React, { useState, useEffect } from "react";
import { useNavigate } from "react-router-dom";
import * as s from "../style/styledmembership";
@@ -72,6 +72,7 @@ const Membership = () => {
e.preventDefault();
try {
const csrfToken = getCsrfToken();
+ console.log("CSRF Token:", csrfToken);
const config = {
headers: {
"Content-Type": "application/json",
@@ -87,15 +88,24 @@ const Membership = () => {
config
);
console.log("회원가입 성공:", res.data);
- console.log("Session cookie:", document.cookie); // 세션 쿠키 확인
- navigate("/info1");
+ console.log("Session cookie:", document.cookie);
+
+
+ const sessionId = document.cookie
+ .split("; ")
+ .find((row) => row.startsWith("sessionid="))
+ ?.split("=")[1];
+ const sessionData = { ...formData, sessionId };
+ localStorage.setItem("sessionData", JSON.stringify(sessionData));
+
+ navigate("/logincomplete");
} catch (err) {
if (err.response && err.response.data) {
const serverErrors = err.response.data;
if (
serverErrors.username &&
serverErrors.username.includes(
- "A user with that username already exists."
+ "이미 사용중인 아이디 입니다."
)
) {
serverErrors.username = ["중복된 아이디가 있습니다."];
@@ -141,7 +151,7 @@ const Membership = () => {
required
/>
{errors.username && (
- {errors.username}
+ {errors.username}
)}
@@ -156,7 +166,7 @@ const Membership = () => {
required
/>
{errors.password && (
- {errors.password}
+ {errors.password}
)}
@@ -171,7 +181,7 @@ const Membership = () => {
required
/>
{errors.password_confirm && (
- {errors.password_confirm}
+ {errors.password_confirm}
)}
@@ -186,7 +196,7 @@ const Membership = () => {
required
/>
{errors.first_name && (
- {errors.first_name}
+ {errors.first_name}
)}
@@ -200,7 +210,7 @@ const Membership = () => {
placeholder="Email을 입력해주세요."
required
/>
- {errors.email && {errors.email}
}
+ {errors.email && {errors.email}
}
약관
@@ -230,7 +240,7 @@ const Membership = () => {
(필수) 개인회원 약관에 동의
{errors.terms_accepted_1 && (
- {errors.terms_accepted_1}
+ {errors.terms_accepted_1}
)}
@@ -251,7 +261,7 @@ const Membership = () => {
(필수) 개인정보 수집 및 이용에 동의
{errors.terms_accepted_2 && (
- {errors.terms_accepted_2}
+ {errors.terms_accepted_2}
)}
@@ -266,13 +276,13 @@ const Membership = () => {
(선택) 이메일 등 마케팅 정보 수신 동의
{errors.terms_accepted_optional && (
- {errors.terms_accepted_optional}
+ {errors.terms_accepted_optional}
)}
- 🔥 회원 정보 저장하고 키워드 선택하기
+ 🔥 회원 정보 저장하고 키워드 선택하기
diff --git a/customfront/src/page/mypage.jsx b/customfront/src/page/mypage.jsx
index 789e15fb0..42fdf5232 100644
--- a/customfront/src/page/mypage.jsx
+++ b/customfront/src/page/mypage.jsx
@@ -1,18 +1,147 @@
-import React from "react";
+import React, { useEffect, useState } from "react";
import { useNavigate } from "react-router-dom";
+import axios from 'axios';
import * as m from "../style/styledmypage";
const Mypage = () => {
const navigate = useNavigate();
+ const [userInfo, setUserInfo] = useState(null);
+ const [isMenuOpen, setIsMenuOpen] = useState(false);
+
+ const goMain0 = () => {
+ navigate(`/Main0`);
+ };
+
+ const goReviewcheck1 = () => {
+ navigate(`/Reviewcheck1`);
+ };
+
+ const goAlarm1 = () => {
+ navigate(`/Alarm1`);
+ };
+
+ const goAlarm2 = () => {
+ navigate(`/Alarm2`);
+ };
+
+ const goAlarm3 = () => {
+ navigate(`/Alarm3`);
+ };
+
+ const goMain2 = () => {
+ navigate(`/`);
+ };
+
+ const goMypage = () => {
+ navigate(`/Mypage`);
+ };
+
+ const goReview = () => {
+ navigate(`/Review`);
+ };
+
+ const goLogin = () => {
+ navigate(`/Login`);
+ };
+
+ const toggleMenu = () => {
+ setIsMenuOpen(!isMenuOpen);
+ };
+
+ const closeMenu = () => {
+ setIsMenuOpen(false);
+ };
+
+ // 사용자 정보를 가져오는 함수
+ const fetchUserInfo = async () => {
+ try {
+ const token = localStorage.getItem('token'); // 로그인 후 저장된 토큰을 가져옵니다.
+ const response = await axios.get('http://127.0.0.1:8000/myPage/profile', {
+ headers: {
+ 'Authorization': `Token ${token}` // Authorization 헤더에 토큰을 포함합니다.
+ }
+ });
+ setUserInfo(response.data);
+ } catch (error) {
+ console.error('Error fetching user info:', error);
+ }
+ };
+
+ // 컴포넌트가 마운트될 때 사용자 정보를 가져옵니다.
+ useEffect(() => {
+ fetchUserInfo();
+ }, []);
const goPwchange = () => {
navigate(`/pwchange`);
};
- const goInfo1 = () => {
- navigate(`/Info1`);
+ const goChangeInfo = () => {
+ navigate(`/ChangeInfo`);
+ };
+
+ const diseaseMapping = {
+ diabetes: "당뇨",
+ obesity: "비만",
+ muscle_loss: "근손실",
+ hypertension: "고혈압",
+ };
+
+ const getDiseaseName = (diseaseKey) => {
+ return diseaseMapping[diseaseKey] || diseaseKey;
+ };
+
+ const ageMapping = {
+ under_19: "19세 이하",
+ "20-29": "20~29세",
+ "30-39": "30~39세",
+ "40-49": "40~49세",
+ "50-59": "50~59세",
+ "60-69": "60~69세",
+ over_70: "70 이상",
};
+ const genderMapping = {
+ Male: "남성",
+ Female: "여성",
+ };
+
+ const heightMapping = {
+ under_149: "149cm 이하",
+ "150-154": "150~154cm",
+ "155-159": "155~159cm",
+ "160-164": "160~164cm",
+ "165-169": "165~169cm",
+ "170-174": "170~174cm",
+ "175-179": "175~179cm",
+ over_180: "180cm 이상",
+ };
+
+ const weightMapping = {
+ under_39: "39kg 이하",
+ "40-44": "40~44kg",
+ "45-49": "45~49kg",
+ "50-54": "50~54kg",
+ "55-59": "55~59kg",
+ "60-64": "60~64kg",
+ "65-69": "65~69kg",
+ "70-74": "70~74kg",
+ "75-79": "75~79kg",
+ "80-84": "80~84kg",
+ "85-89": "85~89kg",
+ "90-94": "90~94kg",
+ "95-99": "95~99kg",
+ over_100: "100kg 이상",
+ };
+
+ const getDisplayValue = (mapping, key) => {
+ return mapping[key] || key;
+ };
+
+ // userInfo가 로드되지 않았거나 에러가 발생한 경우 로딩 상태 표시
+ if (!userInfo) {
+ return Loading...
;
+ }
return (
@@ -34,6 +163,7 @@ const Mypage = () => {
src={`${process.env.PUBLIC_URL}/logo/ylogo.svg`}
alt="logo"
width="40px"
+ onClick={goMain2}
/>
{
left: "8px",
cursor: "pointer",
}}
- onClick={() => navigate(-1)}
+ onClick={goAlarm1}
/>
{
left: "8px",
cursor: "pointer",
}}
- onClick={() => navigate(-1)}
+ onClick={toggleMenu}
/>
-
+ {isMenuOpen && (
+ <>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ >
+ )}
+
-
-
+
- 김세모 님
+ {userInfo.first_name} 님
-
+
- #20대
- #여성
+ #{getDisplayValue(ageMapping, userInfo.age)}
+ #{getDisplayValue(genderMapping, userInfo.gender)}
- #당뇨
- #160~165cm
- #60~65kg
+ #{getDiseaseName(userInfo.disease)}
+ #{getDisplayValue(heightMapping, userInfo.height)}
+ #{getDisplayValue(weightMapping, userInfo.weight)}
+ id="pwchange"
+ src={`${process.env.PUBLIC_URL}/logo/pwchange.svg`}
+ alt="pwchange button"
+ style={{
+ position: "absolute",
+ top: "308px",
+ left: "18px",
+ cursor: "pointer",
+ }}
+ onClick={goPwchange}
+ />
+ id="keychange"
+ src={`${process.env.PUBLIC_URL}/logo/keychange.svg`}
+ alt="keychange button"
+ style={{
+ position: "absolute",
+ top: "308px",
+ left: "210px",
+ cursor: "pointer",
+ }}
+ onClick={goChangeInfo}
+ />
- 🔥 후기를 작성하고, 키워드를 강화해요!
+ 🔥 후기를 작성하고, 키워드를 강화해요!
-cd
- 나의 리뷰 확인하기
- 리뷰 작성하기
+
+ 나의 리뷰 확인하기
+ 리뷰 작성하기
🔔 최근 알림을 확인해 주세요!
- 공지 제목입니다.
- 공지 제목입니다.
+ 키워드를 업데이트 해주세요!
+ 회원 가입을 환영합니다!
-
-
+
+
-
- 더 많은 알림 확인하기
+
+ 더 많은 알림 확인하기
-
);
};
-export default Mypage;
\ No newline at end of file
+export default Mypage;
diff --git a/customfront/src/page/pwchange.jsx b/customfront/src/page/pwchange.jsx
index 63790e897..c4cce9a41 100644
--- a/customfront/src/page/pwchange.jsx
+++ b/customfront/src/page/pwchange.jsx
@@ -5,6 +5,10 @@ import * as p from "../style/styledpwchange";
const Pwchange = () => {
const navigate = useNavigate();
+ const goPwchange1 = () => {
+ navigate(`/Pwchange1`);
+ };
+
return (
@@ -20,50 +24,19 @@ const Pwchange = () => {
}}
onClick={() => navigate(-1)}
/>
-
-
navigate(-1)}
- />
- navigate(-1)}
- />
-
-
-
-
-
+
+ 비밀번호 변경하기
계정 생성시 사용한 E Mail을 입력해주세요.
-
-
-
-
-
-
- 더 많은 알림 확인하기
+
+
+
+
+ E Mail로 비밀번호 변경 링크 보내기
diff --git a/customfront/src/page/pwchange1.jsx b/customfront/src/page/pwchange1.jsx
index e431c9609..d37ab4266 100644
--- a/customfront/src/page/pwchange1.jsx
+++ b/customfront/src/page/pwchange1.jsx
@@ -1,10 +1,14 @@
import React from "react";
import { useNavigate } from "react-router-dom";
-import * as p1 from "../style/styledpwchange";
+import * as p1 from "../style/styledpwchange1";
const Pwchange1 = () => {
const navigate = useNavigate();
+ const goMain = () => {
+ navigate(`/`);
+ };
+
return (
@@ -20,57 +24,23 @@ const Pwchange1 = () => {
}}
onClick={() => navigate(-1)}
/>
-
-
navigate(-1)}
- />
- navigate(-1)}
- />
-
-
-
- 링크가 전송되었습니다.
+ 링크가 전송되었습니다.
+ 메일로 이동해 비밀번호 변경을 진행해 주세요!
- 메일로 이동해 비밀번호 변경을 진행해 주세요!
-
diff --git a/customfront/src/page/review.jsx b/customfront/src/page/review.jsx
index c2cff1d51..b1df08585 100644
--- a/customfront/src/page/review.jsx
+++ b/customfront/src/page/review.jsx
@@ -1,60 +1,91 @@
import React, { useEffect, useState } from "react";
import { useNavigate } from "react-router-dom";
-import axios from "axios";
+import axios from 'axios';
import * as r from "../style/styledreview";
const Review = () => {
const navigate = useNavigate();
+ const [isMenuOpen, setIsMenuOpen] = useState(false);
const [box2Items, setBox2Items] = useState([]);
const [loading, setLoading] = useState(true);
const [error, setError] = useState(null);
const [selectedProduct, setSelectedProduct] = useState(null);
const [reviewText, setReviewText] = useState("");
const [selectedImage, setSelectedImage] = useState(null);
- const [userName, setUserName] = useState(""); // 사용자 이름 상태
+ const [userInfo, setUserInfo] = useState(null);
- const goMain = () => {
+ const goMain2 = () => {
navigate(`/`);
};
- const goReviewcheck1 = () => {
- if (selectedProduct && reviewText && selectedImage) {
- navigate(`/Reviewcheck1`, { state: { product: selectedProduct, review: reviewText, selectedImage } });
- } else {
- alert("제품을 선택하고 리뷰를 작성하고 이미지를 선택해주세요.");
- }
+ const goMain0 = () => {
+ navigate(`/Main0`);
};
- const handleImageClick = (imageType) => {
- setSelectedImage(imageType);
+ const goMypage = () => {
+ navigate(`/Mypage`);
+ };
+
+ const goReview = () => {
+ navigate(`/Review`);
+ };
+
+ const goLogin = () => {
+ navigate(`/Login`);
+ };
+
+ const toggleMenu = () => {
+ setIsMenuOpen(!isMenuOpen);
+ };
+
+ const closeMenu = () => {
+ setIsMenuOpen(false);
+ };
+
+ // 사용자 정보를 가져오는 함수
+ const fetchUserInfo = async () => {
+ try {
+ const token = localStorage.getItem("token"); // 로그인 후 저장된 토큰을 가져옵니다.
+ const response = await axios.get("http://127.0.0.1:8000/myPage/profile", {
+ headers: {
+ Authorization: `Token ${token}`, // Authorization 헤더에 토큰을 포함합니다.
+ },
+ });
+ setUserInfo(response.data);
+ } catch (error) {
+ console.error("Error fetching user info:", error);
+ }
};
+ // 사용자 정보를 가져오는 useEffect
+ useEffect(() => {
+ fetchUserInfo();
+ }, []);
+
+ // 추천 제품을 가져오는 useEffect
useEffect(() => {
const fetchRecommendedProducts = async () => {
try {
- const token = localStorage.getItem('token');
+ const token = localStorage.getItem("token");
if (!token) {
throw new Error("No token found");
}
const config = {
headers: {
- 'Authorization': `Token ${token}`
- }
+ Authorization: `Token ${token}`,
+ },
};
- // 추천 제품 데이터 가져오기
- const response = await axios.get('http://127.0.0.1:8000/myPage/recommended-products/', config);
- const products = response.data.map(product => ({
+ const response = await axios.get(
+ "http://127.0.0.1:8000/myPage/recommended-products/",
+ config
+ );
+ const products = response.data.map((product) => ({
id: product.recommendedProduct_id,
name: product.product_name,
}));
setBox2Items(products);
-
- // 사용자 데이터 가져오기
- const userResponse = await axios.get('http://127.0.0.1:8000/myPage/user/', config); // 사용자 정보 API 엔드포인트
- setUserName(userResponse.data.first_name); // 사용자 이름 저장
-
setLoading(false);
} catch (err) {
if (err.message === "No token found") {
@@ -81,6 +112,21 @@ const Review = () => {
if (error) {
return Error: {error.message}
;
}
+
+
+ const goReviewcheck1 = () => {
+ if (selectedProduct && reviewText && selectedImage) {
+ navigate(`/Reviewcheck1`, {
+ state: { product: selectedProduct, review: reviewText, selectedImage },
+ });
+ } else {
+ alert("제품을 선택 후 버튼을 누르고 리뷰를 작성해주세요.");
+ }
+ };
+
+ const handleImageClick = (imageType) => {
+ setSelectedImage(imageType);
+ };
return (
@@ -102,7 +148,7 @@ const Review = () => {
src={`${process.env.PUBLIC_URL}/logo/ylogo.svg`}
alt="logo"
width="40px"
- onClick={goMain}
+ onClick={goMain2}
/>
{
left: "8px",
cursor: "pointer",
}}
- onClick={() => navigate(-1)}
+ onClick={toggleMenu}
/>
+ {isMenuOpen && (
+ <>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ >
+ )}
+
리뷰 작성하기
@@ -140,7 +249,10 @@ const Review = () => {
후기를 작성할 제품을 선택해 주세요.
{box2Items.map((item) => (
- setSelectedProduct(item)}>
+ setSelectedProduct(item)}
+ >
{item.name}
@@ -150,8 +262,10 @@ const Review = () => {
- {userName}님!
- {selectedProduct ? `[${selectedProduct.name}]은 어떠셨어요?` : '[제품명]은 어떠셨어요?'}
+ {userInfo.first_name}님!
+ {selectedProduct
+ ? `[${selectedProduct.name}]은 어떠셨어요?`
+ : "[제품명]은 어떠셨어요?"}
@@ -161,9 +275,9 @@ const Review = () => {
alt="good"
width="65px"
style={{
- border: selectedImage === 'good' ? '2px solid blue' : 'none',
+ border: selectedImage === "good" ? "2px solid blue" : "none",
}}
- onClick={() => handleImageClick('good')}
+ onClick={() => handleImageClick("good")}
/>
{
alt="bad"
width="65px"
style={{
- border: selectedImage === 'bad' ? '2px solid blue' : 'none',
+ border: selectedImage === "bad" ? "2px solid blue" : "none",
}}
- onClick={() => handleImageClick('bad')}
+ onClick={() => handleImageClick("bad")}
/>
diff --git a/customfront/src/page/reviewcheck1.jsx b/customfront/src/page/reviewcheck1.jsx
index c498e45f7..e669e36c3 100644
--- a/customfront/src/page/reviewcheck1.jsx
+++ b/customfront/src/page/reviewcheck1.jsx
@@ -1,60 +1,68 @@
import React, { useEffect, useState } from "react";
import { useLocation, useNavigate } from "react-router-dom";
-import axios from "axios";
import * as e from "../style/styledreviewcheck1";
const Reviewcheck1 = () => {
const navigate = useNavigate();
+ const [isMenuOpen, setIsMenuOpen] = useState(false);
const location = useLocation();
- const { product, review, selectedImage } = location.state || {}; // selectedImage 추가
- const [productData, setProductData] = useState(null);
+ const { product, review, selectedImage } = location.state || {};
+ const [reviews, setReviews] = useState([]);
useEffect(() => {
- const fetchProductData = async () => {
- if (product) {
- try {
- const token = localStorage.getItem('token');
- if (!token) {
- throw new Error("No token found");
- }
-
- const config = {
- headers: {
- 'Authorization': `Token ${token}`
- }
- };
-
- const response = await axios.get(`http://127.0.0.1:8000/myPage/recommended-products/${product.id}/`, config);
- setProductData(response.data);
- } catch (err) {
- if (err.message === "No token found") {
- alert("토큰이 없습니다. 로그인이 필요합니다.");
- navigate("/login");
- } else {
- console.error("An error occurred:", err.message);
- }
- }
- }
- };
-
- fetchProductData();
- }, [product, navigate]);
-
- const goMain = () => {
- navigate(`/`);
- };
+ // 로컬 스토리지에서 리뷰를 가져오기
+ const storedReviews = JSON.parse(localStorage.getItem("reviews")) || [];
+ setReviews(storedReviews);
+ }, []);
- const goReviewcheck2 = () => {
+ useEffect(() => {
if (product && review && selectedImage) {
- navigate(`/Reviewcheck2`, { state: { product, review, selectedImage } });
- } else {
- alert("제품 정보나 리뷰가 없습니다.");
+ // 기존 리뷰를 업데이트
+ setReviews((prevReviews) => {
+ const updatedReviews = prevReviews.map((r) =>
+ r.product.id === product.id ? { product, review, selectedImage } : r
+ );
+ localStorage.setItem("reviews", JSON.stringify(updatedReviews));
+ return updatedReviews;
+ });
}
+ }, [product, review, selectedImage]);
+
+ const goMain0 = () => {
+ navigate(`/Main0`);
};
- if (!product || !review) {
- return Error: 제품 정보나 리뷰가 없습니다.
;
- }
+ const goMain2 = () => {
+ navigate(`/`);
+ };
+
+ const goReview = () => {
+ navigate(`/Review`);
+ };
+
+ const goReviewcheck2 = (review) => {
+ navigate(`/Reviewcheck2`, { state: review });
+ };
+
+ const goMypage = () => {
+ navigate(`/Mypage`);
+ };
+
+ const goLogin = () => {
+ navigate(`/Login`);
+ };
+
+ const toggleMenu = () => {
+ setIsMenuOpen(!isMenuOpen);
+ };
+
+ const closeMenu = () => {
+ setIsMenuOpen(false);
+ };
+
+
+
+
return (
@@ -76,7 +84,7 @@ const Reviewcheck1 = () => {
src={`${process.env.PUBLIC_URL}/logo/ylogo.svg`}
alt="logo"
width="40px"
- onClick={goMain}
+ onClick={goMain2}
/>
{
left: "8px",
cursor: "pointer",
}}
- onClick={() => navigate(-1)}
+ onClick={toggleMenu}
/>
+ {isMenuOpen && (
+ <>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ >
+ )}
+
나의 리뷰 확인하기
-
-
-
-
- [{product.name}]
- {review}
-
-
-
-
-
-
-
-
-
+ {reviews.map((review, index) => (
+
+
+ goReviewcheck2(review)}
+ style={{ cursor: "pointer" }}
+ >
+
+
+ [{review.product.name}]
+
+ {review.review}
+
+
+
+
+
+
+
+ ))}
+
+
새로운 리뷰 작성하기
@@ -143,4 +222,4 @@ const Reviewcheck1 = () => {
);
};
-export default Reviewcheck1;
+export default Reviewcheck1;
\ No newline at end of file
diff --git a/customfront/src/page/reviewcheck2.jsx b/customfront/src/page/reviewcheck2.jsx
index 29e46ed46..11fd26000 100644
--- a/customfront/src/page/reviewcheck2.jsx
+++ b/customfront/src/page/reviewcheck2.jsx
@@ -5,10 +5,41 @@ import * as v from "../style/styledreviewcheck2";
const Reviewcheck2 = () => {
const navigate = useNavigate();
+ const [isMenuOpen, setIsMenuOpen] = useState(false);
const location = useLocation();
const { product, review, selectedImage } = location.state || {}; // selectedImage 추가
const [productData, setProductData] = useState(null);
+ const goMain2 = () => {
+ navigate(`/`);
+ };
+
+ const goMain0 = () => {
+ navigate(`/Main0`);
+ };
+
+ const goMypage = () => {
+ navigate(`/Mypage`);
+ };
+
+ const goReview = () => {
+ navigate(`/Review`);
+ };
+
+ const goLogin = () => {
+ navigate(`/Login`);
+ };
+
+ const toggleMenu = () => {
+ setIsMenuOpen(!isMenuOpen);
+ };
+
+ const closeMenu = () => {
+ setIsMenuOpen(false);
+ };
+
+
+
useEffect(() => {
const fetchProductData = async () => {
if (product) {
@@ -40,10 +71,6 @@ const Reviewcheck2 = () => {
fetchProductData();
}, [product, navigate]);
- const goMain = () => {
- navigate(`/`);
- };
-
const goReviewcheck3 = () => {
if (product && review) {
navigate(`/Reviewcheck3`, { state: { product, review, selectedImage } }); // selectedImage 추가
@@ -76,7 +103,7 @@ const Reviewcheck2 = () => {
src={`${process.env.PUBLIC_URL}/logo/ylogo.svg`}
alt="logo"
width="40px"
- onClick={goMain}
+ onClick={goMain2}
/>
{
left: "8px",
cursor: "pointer",
}}
- onClick={() => navigate(-1)}
+ onClick={toggleMenu}
/>
+ {isMenuOpen && (
+ <>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ >
+ )}
+
[{product.name}]
diff --git a/customfront/src/page/reviewcheck3.jsx b/customfront/src/page/reviewcheck3.jsx
index ef49a9113..803ebeef1 100644
--- a/customfront/src/page/reviewcheck3.jsx
+++ b/customfront/src/page/reviewcheck3.jsx
@@ -5,18 +5,44 @@ import * as i from "../style/styledreviewcheck3";
const Reviewcheck3 = () => {
const navigate = useNavigate();
+ const [isMenuOpen, setIsMenuOpen] = useState(false);
const location = useLocation();
const { product, review } = location.state || {};
const [newReview, setNewReview] = useState(review);
+ const [selectedImage, setSelectedImage] = useState(null); // 선택된 이미지 상태 추가
- const goMain = () => {
+ const goMain2 = () => {
navigate(`/`);
};
+ const goMain0 = () => {
+ navigate(`/Main0`);
+ };
+
+ const goMypage = () => {
+ navigate(`/Mypage`);
+ };
+
+ const goReview = () => {
+ navigate(`/Review`);
+ };
+
+ const goLogin = () => {
+ navigate(`/Login`);
+ };
+
+ const toggleMenu = () => {
+ setIsMenuOpen(!isMenuOpen);
+ };
+
+ const closeMenu = () => {
+ setIsMenuOpen(false);
+ };
+
const goReviewcheck2 = () => {
// reviewcheck2로 이동하며 현재 제품 정보와 수정된 리뷰를 전달
if (product && newReview) {
- navigate(`/Reviewcheck2`, { state: { product, review: newReview } });
+ navigate(`/Reviewcheck2`, { state: { product, review: newReview, selectedImage } });
} else {
alert("제품 정보나 리뷰가 없습니다.");
}
@@ -26,6 +52,10 @@ const Reviewcheck3 = () => {
setNewReview(e.target.value);
};
+ const handleImageSelect = (image) => {
+ setSelectedImage(image); // 이미지 선택 핸들러
+ };
+
const saveReview = async () => {
try {
const token = localStorage.getItem('token');
@@ -45,13 +75,14 @@ const Reviewcheck3 = () => {
const body = {
"GNB": "G",
- "review": newReview
+ "review": newReview,
+ "selectedImage": selectedImage // 선택된 이미지 저장
};
await axios.patch(`http://127.0.0.1:8000/myPage/recommended-products/${product.id}/edit/`, body, config);
// 리뷰 저장 후 Reviewcheck1으로 이동하며 수정된 리뷰를 전달
- navigate(`/Reviewcheck1`, { state: { product, review: newReview } });
+ navigate(`/Reviewcheck1`, { state: { product, review: newReview, selectedImage } });
} catch (err) {
if (err.message === "No token found") {
alert("토큰이 없습니다. 로그인이 필요합니다.");
@@ -82,7 +113,7 @@ const Reviewcheck3 = () => {
src={`${process.env.PUBLIC_URL}/logo/ylogo.svg`}
alt="logo"
width="40px"
- onClick={goMain}
+ onClick={goMain2}
/>
{
left: "8px",
cursor: "pointer",
}}
- onClick={() => navigate(-1)}
+ onClick={toggleMenu}
/>
- 리뷰 작성하기
+ {isMenuOpen && (
+ <>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ >
+ )}
-
+ 리뷰 수정하기
+
김세모님!
[{product.name}]은 어떠셨어요?
-
handleImageSelect('good')}
+ style={{ cursor: 'pointer', border: selectedImage === 'good' ? '2px solid blue' : 'none' }}
/>
-
handleImageSelect('bad')}
+ style={{ cursor: 'pointer', border: selectedImage === 'bad' ? '2px solid blue' : 'none' }}
/>
diff --git a/customfront/src/style/styledalarm1.jsx b/customfront/src/style/styledalarm1.jsx
index 7e20a43b8..bdb31364f 100644
--- a/customfront/src/style/styledalarm1.jsx
+++ b/customfront/src/style/styledalarm1.jsx
@@ -12,30 +12,31 @@ export const Container = styled.div`
export const Header = styled.div`
position: fixed;
- top: 0; /* 페이지의 최상단에 고정 */
+ top: 0;
left: 50%;
- transform: translateX(-50%); /* 화면 가운데로 고정 */
+ transform: translateX(-50%);
background: #fff;
width: 393px;
height: 50px;
- z-index: 10; /* 백드롭과 메뉴보다 위에 표시되도록 */
+ z-index: 10;
#back {
cursor: pointer;
}
#logo {
- display: absolute;
+ position: absolute;
margin-top: 8px;
+ margin-left: -20px;
cursor: pointer;
}
#alarm {
- display: absolute;
+ position: absolute;
margin-top: 3px;
margin-left: 305px;
cursor: pointer;
}
#menu {
- display: absolute;
+ position: absolute;
margin-top: 5px;
margin-left: 343px;
cursor: pointer;
@@ -47,6 +48,7 @@ export const Border = styled.div`
border-bottom: 1.5px solid black;
width: 393px;
padding-bottom: 2px;
+ margin-top: 48px;
`;
export const Top = styled.div`
@@ -72,7 +74,7 @@ export const Keywordd = styled.div`
export const Body = styled.div`
display: flex;
flex-direction: column;
- margin-top: 50px; /* 헤더의 높이만큼 여백을 줌 */
+ margin-top: 50px;
width: 393px;
height: 110px;
`;
@@ -130,8 +132,8 @@ export const SmallBox5 = styled.div`
justify-content: flex-start;
align-items: center;
text-align: flex-start;
- span{
- margin-left: 10px;
+ span {
+ margin-left: 10px;
}
`;
@@ -146,21 +148,21 @@ export const Button2 = styled.div`
gap: 15px;
`;
-// 드롭다운 메뉴 스타일
export const Backdrop = styled.div`
- position: fixed;
- top: 0;
- left: 0;
- width: 100%;
- height: 100%;
+ position: absolute;
+ top: 50%;
+ left: 50%;
+ width: 393px;
+ height: 852px;
background-color: rgba(0, 0, 0, 0.5);
z-index: 1;
+ transform: translate(-50%, -50%);
`;
export const DropdownMenu = styled.div`
- position: fixed; /* 헤더 기준으로 고정 */
- top: 80px; /* 헤더 바로 아래에 위치 */
- left: 70%;
+ position: absolute;
+ top: 80px;
+ left: 80%;
transform: translateX(-50%);
width: 50px;
height: 314px;
@@ -168,7 +170,7 @@ export const DropdownMenu = styled.div`
background: #fff;
box-shadow: 0px 0px 8px 8px #544c4c;
padding: 20px;
- z-index: 11; /* 백드롭보다 위에 표시 */
+ z-index: 11;
display: flex;
flex-direction: column;
justify-content: space-around;
@@ -203,6 +205,4 @@ export const DropdownItem = styled.button`
text-align: center;
border-radius: 50%;
transition: background-color 0.3s ease;
-
-
-`;
+`;
\ No newline at end of file
diff --git a/customfront/src/style/styledchangeinfo.jsx b/customfront/src/style/styledchangeinfo.jsx
index c9b581e63..f2e64a040 100644
--- a/customfront/src/style/styledchangeinfo.jsx
+++ b/customfront/src/style/styledchangeinfo.jsx
@@ -130,3 +130,64 @@ export const SmallBox5 = styled.div`
margin-left: 10px;
}
`;
+
+
+//메뉴바 스타일
+export const Backdrop = styled.div`
+ position: absolute;
+ top: 50%;
+ left: 50%;
+ width: 393px;
+ height: 852px;
+ background-color: rgba(0, 0, 0, 0.5);
+ z-index: 1;
+ transform: translate(-50%, -50%);
+`;
+
+export const DropdownMenu = styled.div`
+ position: absolute;
+ top: 80px;
+ left: 80%;
+ transform: translateX(-50%);
+ width: 50px;
+ height: 314px;
+ border-radius: 50px;
+ background: #fff;
+ box-shadow: 0px 0px 8px 8px #544c4c;
+ padding: 20px;
+ z-index: 11;
+ display: flex;
+ flex-direction: column;
+ justify-content: space-around;
+ align-items: center;
+
+ #mypage {
+ margin-top: 15px;
+ margin-right: 7px;
+ }
+ #myreview {
+ margin-top: 107px;
+ margin-right: 7px;
+ }
+ #mainpage {
+ margin-top: 200px;
+ margin-right: 7px;
+ }
+ #logout {
+ margin-top: 2px;
+ margin-right: 2px;
+ }
+`;
+
+export const DropdownItem = styled.button`
+ background: none;
+ border: none;
+ padding: 10px;
+ font-size: 16px;
+ cursor: pointer;
+ color: #333;
+ width: 100%;
+ text-align: center;
+ border-radius: 50%;
+ transition: background-color 0.3s ease;
+`;
\ No newline at end of file
diff --git a/customfront/src/style/styledchangeinfo1.jsx b/customfront/src/style/styledchangeinfo1.jsx
index ae530e9d2..188d1fbb1 100644
--- a/customfront/src/style/styledchangeinfo1.jsx
+++ b/customfront/src/style/styledchangeinfo1.jsx
@@ -150,3 +150,63 @@ export const Button = styled.div`
margin-top: 15px;
cursor: pointer;
`;
+
+//메뉴바 스타일
+export const Backdrop = styled.div`
+ position: absolute;
+ top: 50%;
+ left: 50%;
+ width: 393px;
+ height: 852px;
+ background-color: rgba(0, 0, 0, 0.5);
+ z-index: 1;
+ transform: translate(-50%, -50%);
+`;
+
+export const DropdownMenu = styled.div`
+ position: absolute;
+ top: 80px;
+ left: 80%;
+ transform: translateX(-50%);
+ width: 50px;
+ height: 314px;
+ border-radius: 50px;
+ background: #fff;
+ box-shadow: 0px 0px 8px 8px #544c4c;
+ padding: 20px;
+ z-index: 11;
+ display: flex;
+ flex-direction: column;
+ justify-content: space-around;
+ align-items: center;
+
+ #mypage {
+ margin-top: 15px;
+ margin-right: 7px;
+ }
+ #myreview {
+ margin-top: 107px;
+ margin-right: 7px;
+ }
+ #mainpage {
+ margin-top: 200px;
+ margin-right: 7px;
+ }
+ #logout {
+ margin-top: 2px;
+ margin-right: 2px;
+ }
+`;
+
+export const DropdownItem = styled.button`
+ background: none;
+ border: none;
+ padding: 10px;
+ font-size: 16px;
+ cursor: pointer;
+ color: #333;
+ width: 100%;
+ text-align: center;
+ border-radius: 50%;
+ transition: background-color 0.3s ease;
+`;
diff --git a/customfront/src/style/styledchangeinfo2.jsx b/customfront/src/style/styledchangeinfo2.jsx
index 910ba0f76..e56ab361f 100644
--- a/customfront/src/style/styledchangeinfo2.jsx
+++ b/customfront/src/style/styledchangeinfo2.jsx
@@ -149,4 +149,65 @@ export const ButtonText = styled.div`
font-style: normal;
font-weight: 500;
line-height: normal;
+`;
+
+
+//메뉴바 스타일
+export const Backdrop = styled.div`
+ position: absolute;
+ top: 50%;
+ left: 50%;
+ width: 393px;
+ height: 852px;
+ background-color: rgba(0, 0, 0, 0.5);
+ z-index: 1;
+ transform: translate(-50%, -50%);
+`;
+
+export const DropdownMenu = styled.div`
+ position: absolute;
+ top: 80px;
+ left: 80%;
+ transform: translateX(-50%);
+ width: 50px;
+ height: 314px;
+ border-radius: 50px;
+ background: #fff;
+ box-shadow: 0px 0px 8px 8px #544c4c;
+ padding: 20px;
+ z-index: 11;
+ display: flex;
+ flex-direction: column;
+ justify-content: space-around;
+ align-items: center;
+
+ #mypage {
+ margin-top: 15px;
+ margin-right: 7px;
+ }
+ #myreview {
+ margin-top: 107px;
+ margin-right: 7px;
+ }
+ #mainpage {
+ margin-top: 200px;
+ margin-right: 7px;
+ }
+ #logout {
+ margin-top: 2px;
+ margin-right: 2px;
+ }
+`;
+
+export const DropdownItem = styled.button`
+ background: none;
+ border: none;
+ padding: 10px;
+ font-size: 16px;
+ cursor: pointer;
+ color: #333;
+ width: 100%;
+ text-align: center;
+ border-radius: 50%;
+ transition: background-color 0.3s ease;
`;
\ No newline at end of file
diff --git a/customfront/src/style/styledchangeinfo3.jsx b/customfront/src/style/styledchangeinfo3.jsx
index af5c0bf14..024107e67 100644
--- a/customfront/src/style/styledchangeinfo3.jsx
+++ b/customfront/src/style/styledchangeinfo3.jsx
@@ -153,3 +153,64 @@ export const ButtonText = styled.div`
font-weight: 500;
line-height: normal;
`;
+
+
+//메뉴바 스타일
+export const Backdrop = styled.div`
+ position: absolute;
+ top: 50%;
+ left: 50%;
+ width: 393px;
+ height: 852px;
+ background-color: rgba(0, 0, 0, 0.5);
+ z-index: 1;
+ transform: translate(-50%, -50%);
+`;
+
+export const DropdownMenu = styled.div`
+ position: absolute;
+ top: 80px;
+ left: 80%;
+ transform: translateX(-50%);
+ width: 50px;
+ height: 314px;
+ border-radius: 50px;
+ background: #fff;
+ box-shadow: 0px 0px 8px 8px #544c4c;
+ padding: 20px;
+ z-index: 11;
+ display: flex;
+ flex-direction: column;
+ justify-content: space-around;
+ align-items: center;
+
+ #mypage {
+ margin-top: 15px;
+ margin-right: 7px;
+ }
+ #myreview {
+ margin-top: 107px;
+ margin-right: 7px;
+ }
+ #mainpage {
+ margin-top: 200px;
+ margin-right: 7px;
+ }
+ #logout {
+ margin-top: 2px;
+ margin-right: 2px;
+ }
+`;
+
+export const DropdownItem = styled.button`
+ background: none;
+ border: none;
+ padding: 10px;
+ font-size: 16px;
+ cursor: pointer;
+ color: #333;
+ width: 100%;
+ text-align: center;
+ border-radius: 50%;
+ transition: background-color 0.3s ease;
+`;
\ No newline at end of file
diff --git a/customfront/src/style/styledchangeinfo4.jsx b/customfront/src/style/styledchangeinfo4.jsx
index ae530e9d2..b3e43b20f 100644
--- a/customfront/src/style/styledchangeinfo4.jsx
+++ b/customfront/src/style/styledchangeinfo4.jsx
@@ -150,3 +150,64 @@ export const Button = styled.div`
margin-top: 15px;
cursor: pointer;
`;
+
+
+//메뉴바 스타일
+export const Backdrop = styled.div`
+ position: absolute;
+ top: 50%;
+ left: 50%;
+ width: 393px;
+ height: 852px;
+ background-color: rgba(0, 0, 0, 0.5);
+ z-index: 1;
+ transform: translate(-50%, -50%);
+`;
+
+export const DropdownMenu = styled.div`
+ position: absolute;
+ top: 80px;
+ left: 80%;
+ transform: translateX(-50%);
+ width: 50px;
+ height: 314px;
+ border-radius: 50px;
+ background: #fff;
+ box-shadow: 0px 0px 8px 8px #544c4c;
+ padding: 20px;
+ z-index: 11;
+ display: flex;
+ flex-direction: column;
+ justify-content: space-around;
+ align-items: center;
+
+ #mypage {
+ margin-top: 15px;
+ margin-right: 7px;
+ }
+ #myreview {
+ margin-top: 107px;
+ margin-right: 7px;
+ }
+ #mainpage {
+ margin-top: 200px;
+ margin-right: 7px;
+ }
+ #logout {
+ margin-top: 2px;
+ margin-right: 2px;
+ }
+`;
+
+export const DropdownItem = styled.button`
+ background: none;
+ border: none;
+ padding: 10px;
+ font-size: 16px;
+ cursor: pointer;
+ color: #333;
+ width: 100%;
+ text-align: center;
+ border-radius: 50%;
+ transition: background-color 0.3s ease;
+`;
\ No newline at end of file
diff --git a/customfront/src/style/styledchangeinfo5.jsx b/customfront/src/style/styledchangeinfo5.jsx
index ae530e9d2..c85913469 100644
--- a/customfront/src/style/styledchangeinfo5.jsx
+++ b/customfront/src/style/styledchangeinfo5.jsx
@@ -150,3 +150,63 @@ export const Button = styled.div`
margin-top: 15px;
cursor: pointer;
`;
+
+//메뉴바 스타일
+export const Backdrop = styled.div`
+ position: absolute;
+ top: 50%;
+ left: 50%;
+ width: 393px;
+ height: 852px;
+ background-color: rgba(0, 0, 0, 0.5);
+ z-index: 1;
+ transform: translate(-50%, -50%);
+`;
+
+export const DropdownMenu = styled.div`
+ position: absolute;
+ top: 80px;
+ left: 80%;
+ transform: translateX(-50%);
+ width: 50px;
+ height: 314px;
+ border-radius: 50px;
+ background: #fff;
+ box-shadow: 0px 0px 8px 8px #544c4c;
+ padding: 20px;
+ z-index: 11;
+ display: flex;
+ flex-direction: column;
+ justify-content: space-around;
+ align-items: center;
+
+ #mypage {
+ margin-top: 15px;
+ margin-right: 7px;
+ }
+ #myreview {
+ margin-top: 107px;
+ margin-right: 7px;
+ }
+ #mainpage {
+ margin-top: 200px;
+ margin-right: 7px;
+ }
+ #logout {
+ margin-top: 2px;
+ margin-right: 2px;
+ }
+`;
+
+export const DropdownItem = styled.button`
+ background: none;
+ border: none;
+ padding: 10px;
+ font-size: 16px;
+ cursor: pointer;
+ color: #333;
+ width: 100%;
+ text-align: center;
+ border-radius: 50%;
+ transition: background-color 0.3s ease;
+`;
\ No newline at end of file
diff --git a/customfront/src/style/styledfirst.jsx b/customfront/src/style/styledfirst.jsx
index 9f53c0f34..189338308 100644
--- a/customfront/src/style/styledfirst.jsx
+++ b/customfront/src/style/styledfirst.jsx
@@ -140,7 +140,7 @@ export const News = styled.div`
display: flex;
margin-top: 20px;
flex-direction: row;
- width: 340px;
+ width: 385px;
height: 350px;
gap: 7px;
overflow-x: auto;
@@ -156,7 +156,7 @@ export const News = styled.div`
export const Card = styled.div`
position: relative;
- margin-left: 5px;
+ margin-left: 18px;
margin-top: 10px;
flex-shrink: 0;
width: 100%;
diff --git a/customfront/src/style/styledinfo1.jsx b/customfront/src/style/styledinfo1.jsx
index 5aa83ece3..ae530e9d2 100644
--- a/customfront/src/style/styledinfo1.jsx
+++ b/customfront/src/style/styledinfo1.jsx
@@ -15,12 +15,35 @@ export const Header = styled.div`
width: 393px;
height: 50px;
z-index: 2;
- #back2 {
+ #back {
+ cursor: pointer;
+ }
+ #logo {
+ display: absolute;
+ margin-top: 8px;
+ cursor: pointer;
+ }
+ #alarm {
+ display: absolute;
+ margin-top: 3px;
+ margin-left: 305px;
+ cursor: pointer;
+ }
+ #menu {
+ display: absolute;
margin-top: 5px;
+ margin-left: 343px;
cursor: pointer;
}
`;
+export const Border = styled.div`
+ position: fixed;
+ border-bottom: 2px solid black;
+ width: 393px;
+ padding-bottom: 2px;
+`;
+
export const Ybox = styled.div`
position: relative;
display: flex;
@@ -110,13 +133,13 @@ export const SmallBox5 = styled.div`
flex-shrink: 0;
border-radius: 15px;
border: 0.3px solid #000;
- background: ${(props) => (props.$isclicked ? "#fffba6" : "#fff")};
+ background: ${(props) => (props.isClicked ? "#fffba6" : "#fff")};
justify-content: center;
align-items: center;
text-align: center;
cursor: pointer;
filter: ${(props) =>
- props.$isclicked ? "drop-shadow(4px 4px 4px rgba(0, 0, 0, 0.25))" : "none"};
+ props.isClicked ? "drop-shadow(4px 4px 4px rgba(0, 0, 0, 0.25))" : "none"};
transition: all 0.1s ease;
span {
margin-left: 10px;
@@ -127,14 +150,3 @@ export const Button = styled.div`
margin-top: 15px;
cursor: pointer;
`;
-
-export const ButtonText = styled.div`
- margin-top: 12px;
- color: #fff;
- text-align: center;
- font-family: "Gothic A1";
- font-size: 15px;
- font-style: normal;
- font-weight: 500;
- line-height: normal;
-`;
\ No newline at end of file
diff --git a/customfront/src/style/styledlogin.jsx b/customfront/src/style/styledlogin.jsx
index eb05315fb..fcbc9d3d8 100644
--- a/customfront/src/style/styledlogin.jsx
+++ b/customfront/src/style/styledlogin.jsx
@@ -74,7 +74,6 @@ export const InsertB = styled.div`
border-radius: 10px;
border: 1.5px solid #000;
background: #fff;
- }
#Pw {
width: 300px;
height: 21.606px;
diff --git a/customfront/src/style/styledlogin2.jsx b/customfront/src/style/styledlogin2.jsx
new file mode 100644
index 000000000..22b35f866
--- /dev/null
+++ b/customfront/src/style/styledlogin2.jsx
@@ -0,0 +1,114 @@
+import { styled } from "styled-components";
+
+export const Container = styled.div`
+ display: flex;
+ position: relative;
+ margin: 0 auto;
+ width: 393px;
+ height: 852px;
+ background: #FFF9C2;
+ #logintitle{
+ margin-top: 110px;
+ margin-left: 85px;
+ }
+`;
+
+
+export const Title = styled.div`
+ positon: relative;
+ width: 333px;
+ height: 347px;
+ flex-shrink: 0;
+ padding-top: 100px;
+ border-radius: 347px;
+ background: rgba(190, 255, 224, 0.56);
+ filter: blur(50px);
+ margin-left: 30px;
+ margin-top: 100px;
+`;
+
+export const Box= styled.div`=
+ padding-top: 100px;
+ margin-top: 100px;
+ width: 333px;
+ height: 347px;
+ flex-shrink: 0;
+ background: trnasparent;
+`;
+
+
+export const InsertA = styled.div`
+ width: 333px;
+ height: 46px;
+ position: absolute;
+ left:30px;
+ top: 540px;
+ flex-shrink: 0;
+ border-radius: 10px;
+ border: 1.5px solid #000;
+ background: #fff;
+ #Id {
+ width: 300px;
+ height: 21.606px;
+ flex-shrink: 0;
+ text-align: left;
+ margin-top: 10px;
+ color: #000;
+ font-family: "Gothic A1";
+ font-size: 20px;
+ font-style: normal;
+ font-weight: 500;
+ line-height: normal;
+ border: none;
+ background: none;
+ }
+`;
+
+export const InsertB = styled.div`
+ width: 333px;
+ height: 46px;
+ position: absolute;
+ left:30px;
+ top: 605px;
+ flex-shrink: 0;
+ border-radius: 10px;
+ border: 1.5px solid #000;
+ background: #fff;
+ #Pw {
+ width: 300px;
+ height: 21.606px;
+ flex-shrink: 0;
+ text-align: left;
+ margin-top: 10px;
+ color: #000;
+ font-family: "Gothic A1";
+ font-size: 20px;
+ font-style: normal;
+ font-weight: 500;
+ line-height: normal;
+ border: none;
+ background: none;
+ }
+`;
+
+export const LoginBox = styled.div`
+ #LoginText {
+ color: #000;
+ margin-top: 5px;
+ text-align: center;
+ font-family: "Gothic A1";
+ font-size: 20px;
+ font-style: normal;
+ font-weight: 500;
+ line-height: normal;
+ }
+ width: 335px;
+ height: 39px;
+ position: absolute;
+ left: 30px;
+ top: 700px;
+ flex-shrink: 0;
+ border-radius: 10px;
+ border: 1.5px solid #000;
+ background: #a7faf0;
+`;
\ No newline at end of file
diff --git a/customfront/src/style/styledlogincomplete.jsx b/customfront/src/style/styledlogincomplete.jsx
new file mode 100644
index 000000000..1f51cbd01
--- /dev/null
+++ b/customfront/src/style/styledlogincomplete.jsx
@@ -0,0 +1,69 @@
+import { styled } from "styled-components";
+
+export const Container = styled.div`
+ display: flex;
+ position: relative;
+ margin: 0 auto;
+ width: 393px;
+ height: 852px;
+ background: none;
+`;
+
+
+export const Title = styled.div`
+ positon: relative;
+ width: 333px;
+ height: 347px;
+ flex-shrink: 0;
+ padding-top: 100px;
+ border-radius: 347px;
+ margin-left: 30px;
+ margin-top: 100px;
+`;
+
+export const Box= styled.div`=
+ padding-top: 100px;
+ margin-top: 100px;
+ width: 333px;
+ height: 347px;
+ flex-shrink: 0;
+ z-index: 900;
+`;
+
+export const Button = styled.button`
+ display: flex;
+ position: absolute;
+ z-index: 10;
+ margin-top: 450px;
+ width: 334px;
+ height: 45px;
+ flex-shrink: 0;
+ border-radius: 10px;
+ background: linear-gradient(90deg, #edd719 0%, #a7faf0 100%);
+ box-shadow: 0px 0px 4px 2px rgba(76, 75, 75, 0.25);
+ cursor: pointer;
+ border: none;
+`;
+
+export const ButtonText = styled.div`
+ display: flex;
+ position: relative;
+ margin-left: 80px;
+ margin-top: 9px;
+ color: #000;
+ text-align: center;
+ align-items: center;
+ justify-content: center;
+ font-family: "Gothic A1";
+ font-size: 18px;
+ font-style: normal;
+ font-weight: 550;
+ line-height: normal;
+`;
+
+export const Image = styled.img`
+ position: absolute;
+ top: 0px;
+ left: 0px;
+ z-index: 1;
+`;
\ No newline at end of file
diff --git a/customfront/src/style/styledmain0.jsx b/customfront/src/style/styledmain0.jsx
index 9fb051a4d..ed197d16c 100644
--- a/customfront/src/style/styledmain0.jsx
+++ b/customfront/src/style/styledmain0.jsx
@@ -97,13 +97,8 @@ export const InputBlank = styled.div`
font-weight: 300;
line-height: normal;
}
-
- #ylogo {
- margin-left: 10px;
- }
`;
-
export const SmallBox2 = styled.div`
display: inline-flex;
margin-left: 5px;
@@ -142,10 +137,10 @@ export const Body = styled.div`
export const Box2 = styled.div`
display: flex;
flex-direction: row;
- width: 370px;
+ width: 375px;
height: 500px;
gap: 7px;
- margin-left: -205px;
+ margin-left: -195px;
overflow-y: auto;
scrollbar-width: none;
background-color: none;
@@ -185,16 +180,126 @@ export const Box = styled.div`
export const Button = styled.div`
position: absolute;
- top: 724px;
- left: 13px;
+ top: 200px;
+ left: 30px;
flex-shrink: 0;
cursor: pointer;
`;
export const Buttontwo = styled.div`
position: absolute;
- top: 724px;
+ top: 660px;
left: 205px;
flex-shrink: 0;
cursor: pointer;
+`;
+
+export const News = styled.div`
+ display: flex;
+ margin-top: 20px;
+ flex-direction: row;
+ width: 372px;
+ height: 350px;
+ gap: 7px;
+ overflow-x: auto;
+ overflow-y: hidden;
+ scrollbar-width: none;
+ background-color: transparent;
+ border: none;
+
+ &::-webkit-scrollbar {
+ display: none;
+ }
+`;
+
+export const Card = styled.div`
+ position: relative;
+ margin-left: 5px;
+ margin-top: 10px;
+ flex-shrink: 0;
+ width: 100%;
+ height: 330px;
+ display: flex;
+ gap: 15px;
+ img {
+ width: 100%;
+ height: 100%;
+ }
+`;
+
+export const Button2 = styled.div`
+ position: relative;
+ margin-top: 10px;
+ margin-left: -190px;
+ cursor: pointer;
+`;
+
+export const Button2Text = styled.div`
+ margin-top: 12px;
+ color: #fff;
+ text-align: center;
+ font-family: "Gothic A1";
+ font-size: 15px;
+ font-style: normal;
+ font-weight: 500;
+ line-height: normal;
+`;
+
+export const Backdrop = styled.div`
+ position: absolute;
+ top: 50%;
+ left: 50%;
+ width: 393px;
+ height: 852px;
+ background-color: rgba(0, 0, 0, 0.5);
+ z-index: 1;
+ transform: translate(-50%, -50%);
+`;
+
+export const DropdownMenu = styled.div`
+ position: absolute;
+ top: 80px;
+ left: 80%;
+ transform: translateX(-50%);
+ width: 50px;
+ height: 314px;
+ border-radius: 50px;
+ background: #fff;
+ box-shadow: 0px 0px 8px 8px #544c4c;
+ padding: 20px;
+ z-index: 11;
+ display: flex;
+ flex-direction: column;
+ justify-content: space-around;
+ align-items: center;
+
+ #mypage {
+ margin-top: 15px;
+ margin-right: 7px;
+ }
+ #myreview {
+ margin-top: 107px;
+ margin-right: 7px;
+ }
+ #mainpage {
+ margin-top: 200px;
+ margin-right: 7px;
+ }
+ #logout {
+ margin-top: 2px;
+ margin-right: 2px;
+ }
+`;
+
+export const DropdownItem = styled.button`
+ background: none;
+ border: none;
+ padding: 10px;
+ font-size: 16px;
+ cursor: pointer;
+ color: #333;
+ width: 100%;
+ text-align: center;
+ border-radius: 50%;
+ transition: background-color 0.3s ease;
`;
\ No newline at end of file
diff --git a/customfront/src/style/styledmain2.jsx b/customfront/src/style/styledmain2.jsx
index 3fc4d2d5d..f7c751114 100644
--- a/customfront/src/style/styledmain2.jsx
+++ b/customfront/src/style/styledmain2.jsx
@@ -16,7 +16,7 @@ export const Header = styled.div`
background: #fff;
width: 393px;
height: 50px;
- z-index: 2;
+ z-index: 999;
#back {
cursor: pointer;
}
@@ -370,9 +370,9 @@ export const Icon = styled.div`
export const Button = styled.div`
margin-top: 25px;
- margin-left: 30px;
- width: 85%;
- height: 30px;
+ margin-left: 10px;
+ width: 95%;
+ height: 50px;
flex-shrink: 0;
border-radius: 5px;
border: 1px solid #edd719;
@@ -381,7 +381,7 @@ export const Button = styled.div`
`;
export const ButtonText = styled.div`
- margin-top: 5px;
+ margin-top: 15px;
color: #000;
text-align: center;
font-family: "Gothic A1";
@@ -442,19 +442,20 @@ export const SelectedItem = styled.li`
// 드롭다운 메뉴 스타일
export const Backdrop = styled.div`
- position: fixed;
- top: 0;
- left: 0;
- width: 100%;
- height: 100%;
+ position: absolute;
+ top: 40%;
+ left: 50%;
+ width: 393px;
+ height: 1000px;
background-color: rgba(0, 0, 0, 0.5);
z-index: 1;
+ transform: translate(-50%, -50%);
`;
export const DropdownMenu = styled.div`
- position: fixed; /* 헤더 기준으로 고정 */
- top: 80px; /* 헤더 바로 아래에 위치 */
- left: 70%;
+ position: absolute;
+ top: 80px;
+ left: 80%;
transform: translateX(-50%);
width: 50px;
height: 314px;
@@ -462,7 +463,7 @@ export const DropdownMenu = styled.div`
background: #fff;
box-shadow: 0px 0px 8px 8px #544c4c;
padding: 20px;
- z-index: 11; /* 백드롭보다 위에 표시 */
+ z-index: 11;
display: flex;
flex-direction: column;
justify-content: space-around;
@@ -497,7 +498,5 @@ export const DropdownItem = styled.button`
text-align: center;
border-radius: 50%;
transition: background-color 0.3s ease;
-
-
`;
diff --git a/customfront/src/style/styledmain3.jsx b/customfront/src/style/styledmain3.jsx
index d3de9732d..7c8552768 100644
--- a/customfront/src/style/styledmain3.jsx
+++ b/customfront/src/style/styledmain3.jsx
@@ -15,7 +15,7 @@ export const Header = styled.div`
background: #fff;
width: 393px;
height: 50px;
- z-index: 2;
+ z-index: 20;
#back {
cursor: pointer;
}
@@ -87,7 +87,7 @@ export const Ybox = styled.div`
align-items: flex-start;
text-align: flex-start;
width: 393px;
- height: 700px;
+ height: 630px;
flex-shrink: 0;
background: #fffde8;
`;
@@ -188,9 +188,9 @@ export const Sbox = styled.div`
align-items: center;
text-align: center;
width: 393px;
- height: 700px;
+ height: 450px;
flex-shrink: 0;
- background: pink;
+ background: #fff;
/*background: linear-gradient(180deg, rgba(255, 255, 255, 0.00) 0%, #FFF 37%, #FFF 69%, #FFF 100%);*/
`;
@@ -210,7 +210,7 @@ export const Otext = styled.div`
width: 350px;
height: 40px;
flex-shrink: 0;
- margin-top: 50px;
+ margin-top: 0px;
margin-left: 20px;
`;
@@ -308,7 +308,7 @@ export const Star = styled.div`
export const Button = styled.div`
margin-top: 50px;
- margin-left: 30px;
+ margin-left: 10px;
width: 298px;
height: 39px;
flex-shrink: 0;
@@ -328,3 +328,62 @@ export const ButtonText = styled.div`
font-weight: 500;
line-height: normal;
`;
+
+export const Backdrop = styled.div`
+ position: absolute;
+ top: 20%;
+ left: 50%;
+ width: 393px;
+ height: 1800px;
+ background-color: rgba(0, 0, 0, 0.5);
+ z-index: 1;
+ transform: translate(-50%, -50%);
+`;
+
+export const DropdownMenu = styled.div`
+ position: absolute;
+ top: 80px;
+ left: 80%;
+ transform: translateX(-50%);
+ width: 50px;
+ height: 314px;
+ border-radius: 50px;
+ background: #fff;
+ box-shadow: 0px 0px 8px 8px #544c4c;
+ padding: 20px;
+ z-index: 11;
+ display: flex;
+ flex-direction: column;
+ justify-content: space-around;
+ align-items: center;
+
+ #mypage {
+ margin-top: 15px;
+ margin-right: 7px;
+ }
+ #myreview {
+ margin-top: 107px;
+ margin-right: 7px;
+ }
+ #mainpage {
+ margin-top: 200px;
+ margin-right: 7px;
+ }
+ #logout {
+ margin-top: 2px;
+ margin-right: 2px;
+ }
+`;
+
+export const DropdownItem = styled.button`
+ background: none;
+ border: none;
+ padding: 10px;
+ font-size: 16px;
+ cursor: pointer;
+ color: #333;
+ width: 100%;
+ text-align: center;
+ border-radius: 50%;
+ transition: background-color 0.3s ease;
+`;
diff --git a/customfront/src/style/styledmembership.jsx b/customfront/src/style/styledmembership.jsx
index 613f97af9..38d80b0ce 100644
--- a/customfront/src/style/styledmembership.jsx
+++ b/customfront/src/style/styledmembership.jsx
@@ -5,12 +5,12 @@ export const Container = styled.div`
margin: 0 auto;
width: 393px;
height: 1100px;
- background: pink;
+ background: #fff;
`;
export const Header = styled.div`
#logo {
- position: absolute; /* 수정된 부분 */
+ position: absolute;
margin-right: -330px;
margin-top: 3px;
}
@@ -64,9 +64,9 @@ export const Label2 = styled.div`
`;
export const InputBlank = styled.div`
- margin-top: 7px;
+ margin-top: 13px;
margin-left: 30px;
- margin-bottom: 20px;
+ margin-bottom: 25px;
width: 328px;
height: 50px;
flex-shrink: 0;
@@ -112,10 +112,10 @@ export const Bottom = styled.div`
display: flex;
flex-direction: column;
align-items: left;
- margin-top: 10px;
+ margin-top: 15px;
margin-left: 30px;
width: 330px;
- height: 190px;
+ height: 180px;
flex-shrink: 0;
border-radius: 10px;
border: 0.3px solid #000;
@@ -127,8 +127,9 @@ export const BottomText = styled.div`
align-items: center;
text-align: left;
background: none;
- margin-bottom: 30px;
- margin-left: 25px;
+ margin-bottom: 20px;
+ margin-top: 5px;
+ margin-left: 20px;
input {
position: relative;
@@ -148,7 +149,7 @@ export const Button = styled.button`
border: none;
`;
-export const ButtonText = styled.div`
+export const Text = styled.div`
display: flex;
position: relative;
color: #000;
@@ -156,8 +157,16 @@ export const ButtonText = styled.div`
align-items: center;
justify-content: center;
font-family: "Gothic A1";
- font-size: 18px;
+ font-size: 15px;
font-style: normal;
font-weight: 550;
line-height: normal;
-`;
\ No newline at end of file
+`;
+
+export const Error = styled.div`
+ color: red;
+ font-size: 2px;
+ margin-top: 0.5rem;
+`;
+
+
diff --git a/customfront/src/style/styledmypage.jsx b/customfront/src/style/styledmypage.jsx
index 98f1aad5d..98feda34f 100644
--- a/customfront/src/style/styledmypage.jsx
+++ b/customfront/src/style/styledmypage.jsx
@@ -4,8 +4,10 @@ export const Container = styled.div`
position: relative;
margin: 0 auto;
width: 393px;
- height: 924px;
+ height: 885px;
+ margin-top: 0px;
background: #fff;
+ overflow: ${(props) => (props.isMenuOpen ? "hidden" : "auto")};
`;
export const Header = styled.div`
@@ -13,23 +15,23 @@ export const Header = styled.div`
background: #fff;
width: 393px;
height: 50px;
- z-index: 2;
+ z-index: 999;
#back {
cursor: pointer;
}
#logo {
- position: absolute;
+ display: absolute;
margin-top: 8px;
cursor: pointer;
}
#alarm {
- position: absolute;
+ display: absolute;
margin-top: 3px;
margin-left: 305px;
cursor: pointer;
}
#menu {
- position: absolute;
+ display: absolute;
margin-top: 5px;
margin-left: 343px;
cursor: pointer;
@@ -76,7 +78,7 @@ export const Keyword = styled.div`
width: 343px;
height: 105px;
top: 156px;
- left: 24px;
+ left: 15px;
flex-shrink: 0;
border-radius: 10px;
background: #FFF9C2;
@@ -84,20 +86,48 @@ export const Keyword = styled.div`
padding: 10px;
`;
+// 공통 스타일
export const Small = styled.div`
padding: 5px 13px;
flex-shrink: 0;
border-radius: 30px;
- background: linear-gradient(180deg, #E1E1E1 0%, #FFFBA6 100%);
+ border: 1px solid #EDD719;
+ background: #FFF;
font-size: 13px;
z-index: 2;
`;
-export const SmallOne = styled(Small)``;
-export const SmallTwo = styled(Small)``;
-export const SmallThree = styled(Small)``;
-export const SmallFour = styled(Small)``;
-export const SmallFive = styled(Small)``;
+// 개별 위치 스타일
+export const SmallOne = styled(Small)`
+ position: absolute;
+ top: 1px;
+ left: 156px;
+`;
+
+export const SmallTwo = styled(Small)`
+ position: absolute;
+ width: 45px;
+ top: 1px;
+ left: 260px;
+`;
+
+export const SmallThree = styled(Small)`
+ position: absolute;
+ top: 50px;
+ left: 20px;
+`;
+
+export const SmallFour = styled(Small)`
+ position: absolute;
+ top: 50px;
+ left: 120px;
+`;
+
+export const SmallFive = styled(Small)`
+ position: absolute;
+ top: 50px;
+ left: 250px;
+`;
export const Wrap = styled.div`
display: flex;
@@ -105,8 +135,8 @@ export const Wrap = styled.div`
align-items: flex-start;
width: 300px;
height: 40px;
- top: 174px;
- left: 175px;
+ top: 20px;
+ left: 5px;
flex-shrink: 0;
border-radius: 10px;
position: absolute;
@@ -118,8 +148,8 @@ export const Wrap2 = styled.div`
align-items: flex-start;
width: 343px;
height: 40px;
- top: 174px;
- left: 175px;
+ top: 20px;
+ left: 5px;
flex-shrink: 0;
border-radius: 10px;
position: absolute;
@@ -146,8 +176,8 @@ export const Check = styled.div`
background: #F2F2F2;
padding: 20px 0px 20px 0px;
text-align: center;
- margin-top: 13px;
- margin-left: 24px;
+ margin-top: 25px;
+ margin-left: 20px;
font-family: "Gothic A1";
font-size: 15px;
font-style: normal;
@@ -163,8 +193,8 @@ export const Write = styled.div`
background: linear-gradient(90deg, rgba(190, 255, 224, 0.45) 0%, #FFF9C2 100%);
padding: 20px 0px 20px 0px;
text-align: center;
- top: 503px;
- left: 204px;
+ top: 515px;
+ left: 210px;
position: absolute;
font-family: "Gothic A1";
font-size: 15px;
@@ -186,6 +216,7 @@ export const Body = styled.div`
export const Text = styled.div`
margin-top: 15px;
margin-bottom: 15px;
+ margin-left: -18px;
width: 308px;
height: 20px;
flex-shrink: 0;
@@ -194,7 +225,7 @@ export const Text = styled.div`
font-size: 15px;
font-style: normal;
font-weight: 600;
- line-height: 150%; /* 22.5px */
+ line-height: 150%;
letter-spacing: -0.165px;
`;
@@ -208,8 +239,8 @@ export const Box = styled.div`
background: #FFF;
box-shadow: 0px 0px 3px 1px rgba(0, 0, 0, 0.25);
text-align: left;
- display: flex; /* 자식 요소를 수평으로 정렬하기 위해 flex 사용 */
- align-items: center; /* 수직 가운데 정렬 */
+ display: flex;
+ align-items: center;
padding-left: 15px;
cursor: pointer;
`;
@@ -235,4 +266,65 @@ export const ButtonText = styled.div`
line-height: 150%; /* 22.5px */
letter-spacing: -0.165px;
cursor: pointer;
+`;
+
+export const Backdrop = styled.div`
+ position: absolute;
+ top: 50%;
+ left: 50%;
+ width: 393px;
+ height: 910px;
+ background-color: rgba(0, 0, 0, 0.5);
+ z-index: 10;
+ transform: translate(-50%, -50%);
+ scrollbar-width: none;
+ background-color: none;
+`;
+
+export const DropdownMenu = styled.div`
+ position: absolute;
+ top: 80px;
+ left: 80%;
+ transform: translateX(-50%);
+ width: 50px;
+ height: 314px;
+ border-radius: 50px;
+ background: #fff;
+ box-shadow: 0px 0px 8px 8px #544c4c;
+ padding: 20px;
+ z-index: 11;
+ display: flex;
+ flex-direction: column;
+ justify-content: space-around;
+ align-items: center;
+
+ #mypage {
+ margin-top: 15px;
+ margin-right: 7px;
+ }
+ #myreview {
+ margin-top: 107px;
+ margin-right: 7px;
+ }
+ #mainpage {
+ margin-top: 200px;
+ margin-right: 7px;
+ }
+ #logout {
+ margin-top: 2px;
+ margin-right: 2px;
+ }
+`;
+
+export const DropdownItem = styled.button`
+ background: none;
+ border: none;
+ padding: 10px;
+ font-size: 16px;
+ cursor: pointer;
+ color: #333;
+ width: 100%;
+ text-align: center;
+ border-radius: 50%;
+ transition: background-color 0.3s ease;
`;
\ No newline at end of file
diff --git a/customfront/src/style/styledpwchange.jsx b/customfront/src/style/styledpwchange.jsx
index 8e26362eb..b04976d54 100644
--- a/customfront/src/style/styledpwchange.jsx
+++ b/customfront/src/style/styledpwchange.jsx
@@ -4,7 +4,7 @@ export const Container = styled.div`
position: relative;
margin: 0 auto;
width: 393px;
- height: 924px;
+ height: 852px;
margin-top: 0px;
background: #fff;
`;
@@ -44,18 +44,6 @@ export const Border = styled.div`
padding-bottom: 2px;
`;
-export const Top = styled.div`
- text-align: left;
- padding-left: 25px;
- padding-top: 80px;
- color: #000;
- font-family: "Gothic A1";
- font-size: 25px;
- font-style: normal;
- font-weight: 700;
- line-height: normal;
-`;
-
export const Name = styled.div`
text-align: left;
position: absolute;
@@ -69,7 +57,6 @@ export const Name = styled.div`
line-height: normal;
`;
-
export const Kit = styled.div`
top: 255px;
left: 38px;
@@ -84,84 +71,75 @@ export const Kit = styled.div`
`;
export const Check = styled.div`
- top: 292px;
+ top: 250px;
left: 38px;
position: absolute;
color: #000;
font-family: "Gothic A1";
font-size: 13px;
font-style: normal;
- font-weight: 300;
- line-height: 150%; /* 19.5px */
+ font-weight: 400;
+ line-height: 150%;
letter-spacing: -0.143px;
`;
-
export const Body = styled.div`
display: flex;
flex-direction: column;
- margin-top: 30px;
width: 393px;
height: 275px;
flex-shrink: 0;
- background: #FFF9C2;
-`;
-
-export const Text = styled.div`
- margin-top: 15px;
- margin-bottom: 15px;
- width: 308px;
- height: 20px;
- flex-shrink: 0;
- color: #000;
- font-family: "Gothic A1";
- font-size: 15px;
- font-style: normal;
- font-weight: 600;
- line-height: 150%; /* 22.5px */
- letter-spacing: -0.165px;
+ background: #fff;
`;
export const Box = styled.div`
margin-top: 10px;
margin-left: 30px;
width: 345px;
- height: 50px;
+ height: 50px;
flex-shrink: 0;
border-radius: 10px;
- background: #FFF;
+ background: #fff;
box-shadow: 0px 0px 3px 1px rgba(0, 0, 0, 0.25);
cursor: pointer;
`;
export const Button = styled.div`
-`;
-
-export const ButtonImage = styled.div`
- top:28px;
- left:113px;
- postion: absolute;
+ margin-top: 15px;
+ margin-left: 43px;
+ width: 328px;
+ height: 45px;
+ box-shadow: 0px 0px 4px 2px rgba(76, 75, 75, 0.25);
+ cursor: pointer;
+ border: none;
+ border-radius: 10px;
+ background: #fff9c2;
+ width: 315px;
+ height: 59.009px;
+ flex-shrink: 0;
`;
export const ButtonText = styled.div`
- margin-top: 31px;
+ display: flex;
+ position: relative;
color: #000;
text-align: center;
+ align-items: center;
+ justify-content: center;
+ margin-top: 18px;
font-family: "Gothic A1";
font-size: 15px;
font-style: normal;
- font-weight: 400;
- line-height: 150%; /* 22.5px */
- letter-spacing: -0.165px;
- cursor: pointer;
+ font-weight: 550;
+ line-height: normal;
`;
export const InputBlank = styled.div`
- margin-top: 7px;
- margin-left: 30px;
+ margin-top: 50px;
+ margin-left: 42px;
margin-bottom: 20px;
- width: 328px;
- height: 50px;
+ width: 315px;
+ height: 60px;
flex-shrink: 0;
border-radius: 10px;
background: #fff;
@@ -170,11 +148,11 @@ export const InputBlank = styled.div`
border: none;
outline: none;
width: 273px;
- margin-top: 15px;
- margin-left: -30px;
+ margin-top: 18px;
+ margin-left: -15px;
color: #000;
font-family: "Gothic A1";
- font-size: 13px;
+ font-size: 15px;
font-style: normal;
font-weight: 250;
line-height: 150%; /* 19.5px */
@@ -185,10 +163,11 @@ export const InputBlank = styled.div`
export const Label = styled.div`
display: flex;
- margin-top: 15px;
- margin-left: 15px;
+ position: relative;
+ margin-top: 220px;
+ margin-left: 20px;
color: #000;
font-size: 18px;
- font-weight: 500;
+ font-weight: 600;
padding-left: 20px;
-`;
\ No newline at end of file
+`;
diff --git a/customfront/src/style/styledpwchange1.jsx b/customfront/src/style/styledpwchange1.jsx
index abc2aaab9..abed6c775 100644
--- a/customfront/src/style/styledpwchange1.jsx
+++ b/customfront/src/style/styledpwchange1.jsx
@@ -73,27 +73,30 @@ export const Name = styled.div`
export const Kit = styled.div`
position: absolute;
top: 200px;
- left: 50px;
+ left: 90px;
color: #000;
font-family: "Gothic A1";
font-size: 20px;
font-style: normal;
- font-weight: 500;
+ font-weight: 700;
line-height: 150%; /* 30px */
letter-spacing: -0.22px;
`;
export const Check = styled.div`
position: absolute;
- top:
- left:
+ width: 300px;
+ margin-top: 5px;
+ justify-content: center;
+ text-align: center;
+ item-align: center;
+ margin-left: -40px;
color: #000;
font-family: "Gothic A1";
font-size: 13px;
font-style: normal;
- font-weight: 300;
- line-height: 150%; /* 19.5px */
- letter-spacing: -0.143px;
+ font-weight: 500;
+ letter-spacing: -0.0005px;
`;
diff --git a/customfront/src/style/styledreview.jsx b/customfront/src/style/styledreview.jsx
index cdb03ea0d..fd226b5d6 100644
--- a/customfront/src/style/styledreview.jsx
+++ b/customfront/src/style/styledreview.jsx
@@ -202,4 +202,64 @@ export const ButtonText = styled.div`
font-style: normal;
font-weight: 500;
line-height: normal;
-`;
\ No newline at end of file
+`;
+
+//메뉴바 스타일
+export const Backdrop = styled.div`
+ position: absolute;
+ top: 50%;
+ left: 50%;
+ width: 393px;
+ height: 852px;
+ background-color: rgba(0, 0, 0, 0.5);
+ z-index: 1;
+ transform: translate(-50%, -50%);
+`;
+
+export const DropdownMenu = styled.div`
+ position: absolute;
+ top: 80px;
+ left: 80%;
+ transform: translateX(-50%);
+ width: 50px;
+ height: 314px;
+ border-radius: 50px;
+ background: #fff;
+ box-shadow: 0px 0px 8px 8px #544c4c;
+ padding: 20px;
+ z-index: 11;
+ display: flex;
+ flex-direction: column;
+ justify-content: space-around;
+ align-items: center;
+
+ #mypage {
+ margin-top: 15px;
+ margin-right: 7px;
+ }
+ #myreview {
+ margin-top: 107px;
+ margin-right: 7px;
+ }
+ #mainpage {
+ margin-top: 200px;
+ margin-right: 7px;
+ }
+ #logout {
+ margin-top: 2px;
+ margin-right: 2px;
+ }
+`;
+
+export const DropdownItem = styled.button`
+ background: none;
+ border: none;
+ padding: 10px;
+ font-size: 16px;
+ cursor: pointer;
+ color: #333;
+ width: 100%;
+ text-align: center;
+ border-radius: 50%;
+ transition: background-color 0.3s ease;
+`;
diff --git a/customfront/src/style/styledreviewcheck1.jsx b/customfront/src/style/styledreviewcheck1.jsx
index 7c70d21d7..a35154f30 100644
--- a/customfront/src/style/styledreviewcheck1.jsx
+++ b/customfront/src/style/styledreviewcheck1.jsx
@@ -57,7 +57,7 @@ export const Top = styled.div`
export const Keywordd = styled.div`
margin-left: 20px;
- margin-top: 30px;
+ margin-top: 20px;
display: flex;
justify-content: center;
`;
@@ -89,6 +89,7 @@ export const Box = styled.div`
align-items: center;
text-align: center;
margin-top: 5px;
+ margin-bottom: -113px;
width: 393px;
height: 182px;
flex-shrink: 0;
@@ -122,16 +123,29 @@ export const SmallBox5 = styled.div`
justify-content: flex-start;
align-items: center;
text-align: flex-start;
- span{
- margin-left: 10px;
+ span {
+ margin-left: 10px;
}
`;
export const Click = styled.div`
- position: absolute;
- right: 2px;
+ position: absolute;
+ right: 2px;
top: 3px;
- cursor: pointer;
+ cursor: pointer;
+
+ #review-image {
+ width: 45px;
+ margin-top: ${({ type }) =>
+ type === "bad" ? "-8px" : "0px"}; /* 'bad'일 때 위로 이동 */
+ margin-right: ${({ type }) =>
+ type === "bad" ? "-9px" : "0px"}; /* 'bad'일 때 오른쪽으로 이동 */
+ ${({ type }) =>
+ type === "bad" &&
+ `
+ width: 65px; /* 'bad'일 때 크기 조절 */
+ `}
+ }
`;
export const Button2 = styled.div`
@@ -147,9 +161,10 @@ export const Button2 = styled.div`
export const Button = styled.div`
margin-top: 100px;
- margin-left: 30px;
- width: 85%;
- height: 30px;
+ margin-left: 50px;
+ width: 298px;
+ height: 39px;
+ flex-shrink: 0;
flex-shrink: 0;
border-radius: 10px;
border: 0.5px solid #fff9c2;
@@ -159,7 +174,7 @@ export const Button = styled.div`
`;
export const ButtonText = styled.div`
- margin-top: 5px;
+ margin-top: 9px;
color: #000;
text-align: center;
font-family: "Gothic A1";
@@ -167,4 +182,69 @@ export const ButtonText = styled.div`
font-style: normal;
font-weight: 500;
line-height: normal;
+`;
+
+export const ReviewImage = styled.img`
+ width: ${({ type }) =>
+ type === "bad" ? "65px" : "60px"}; /* bad 이미지 크기 키움 */
+`;
+
+//메뉴바 스타일
+export const Backdrop = styled.div`
+ position: absolute;
+ top: 50%;
+ left: 50%;
+ width: 393px;
+ height: 100%;;
+ background-color: rgba(0, 0, 0, 0.5);
+ z-index: 1;
+ transform: translate(-50%, -50%);
+`;
+
+export const DropdownMenu = styled.div`
+ position: absolute;
+ top: 80px;
+ left: 80%;
+ transform: translateX(-50%);
+ width: 50px;
+ height: 314px;
+ border-radius: 50px;
+ background: #fff;
+ box-shadow: 0px 0px 8px 8px #544c4c;
+ padding: 20px;
+ z-index: 11;
+ display: flex;
+ flex-direction: column;
+ justify-content: space-around;
+ align-items: center;
+
+ #mypage {
+ margin-top: 15px;
+ margin-right: 7px;
+ }
+ #myreview {
+ margin-top: 107px;
+ margin-right: 7px;
+ }
+ #mainpage {
+ margin-top: 200px;
+ margin-right: 7px;
+ }
+ #logout {
+ margin-top: 2px;
+ margin-right: 2px;
+ }
+`;
+
+export const DropdownItem = styled.button`
+ background: none;
+ border: none;
+ padding: 10px;
+ font-size: 16px;
+ cursor: pointer;
+ color: #333;
+ width: 100%;
+ text-align: center;
+ border-radius: 50%;
+ transition: background-color 0.3s ease;
`;
\ No newline at end of file
diff --git a/customfront/src/style/styledreviewcheck2.jsx b/customfront/src/style/styledreviewcheck2.jsx
index 36a1c94e6..b766977e9 100644
--- a/customfront/src/style/styledreviewcheck2.jsx
+++ b/customfront/src/style/styledreviewcheck2.jsx
@@ -14,7 +14,7 @@ export const Header = styled.div`
background: #fff;
width: 393px;
height: 50px;
- z-index: 2;
+ z-index: 10;
#back {
cursor: pointer;
}
@@ -146,9 +146,10 @@ export const Button2 = styled.div`
export const Button = styled.div`
margin-top: 100px;
- margin-left: 30px;
- width: 85%;
- height: 30px;
+ margin-left: 50px;
+ width: 298px;
+ height: 39px;
+ flex-shrink: 0;
flex-shrink: 0;
border-radius: 10px;
border: 0.5px solid #fff9c2;
@@ -158,7 +159,7 @@ export const Button = styled.div`
`;
export const ButtonText = styled.div`
- margin-top: 5px;
+ margin-top: 9px;
color: #000;
text-align: center;
font-family: "Gothic A1";
@@ -167,3 +168,63 @@ export const ButtonText = styled.div`
font-weight: 500;
line-height: normal;
`;
+
+//메뉴바 스타일
+export const Backdrop = styled.div`
+ position: absolute;
+ top: 50%;
+ left: 50%;
+ width: 393px;
+ height: 852px;
+ background-color: rgba(0, 0, 0, 0.5);
+ z-index: 5;
+ transform: translate(-50%, -50%);
+`;
+
+export const DropdownMenu = styled.div`
+ position: absolute;
+ top: 80px;
+ left: 80%;
+ transform: translateX(-50%);
+ width: 50px;
+ height: 314px;
+ border-radius: 50px;
+ background: #fff;
+ box-shadow: 0px 0px 8px 8px #544c4c;
+ padding: 20px;
+ z-index: 11;
+ display: flex;
+ flex-direction: column;
+ justify-content: space-around;
+ align-items: center;
+
+ #mypage {
+ margin-top: 15px;
+ margin-right: 7px;
+ }
+ #myreview {
+ margin-top: 107px;
+ margin-right: 7px;
+ }
+ #mainpage {
+ margin-top: 200px;
+ margin-right: 7px;
+ }
+ #logout {
+ margin-top: 2px;
+ margin-right: 2px;
+ }
+`;
+
+export const DropdownItem = styled.button`
+ background: none;
+ border: none;
+ padding: 10px;
+ font-size: 16px;
+ cursor: pointer;
+ color: #333;
+ width: 100%;
+ text-align: center;
+ border-radius: 50%;
+ transition: background-color 0.3s ease;
+`;
\ No newline at end of file
diff --git a/customfront/src/style/styledreviewcheck3.jsx b/customfront/src/style/styledreviewcheck3.jsx
index 16023c1db..b540ff690 100644
--- a/customfront/src/style/styledreviewcheck3.jsx
+++ b/customfront/src/style/styledreviewcheck3.jsx
@@ -126,10 +126,11 @@ export const Button2 = styled.div`
`;
export const Button = styled.div`
- margin-top: 50px;
- margin-left: 30px;
- width: 85%;
- height: 30px;
+ margin-top: 100px;
+ margin-left: 50px;
+ width: 298px;
+ height: 39px;
+ flex-shrink: 0;
flex-shrink: 0;
border-radius: 10px;
border: 0.5px solid #fff9c2;
@@ -138,11 +139,22 @@ export const Button = styled.div`
cursor: pointer;
`;
+export const ButtonText = styled.div`
+ margin-top: 9px;
+ color: #000;
+ text-align: center;
+ font-family: "Gothic A1";
+ font-size: 15px;
+ font-style: normal;
+ font-weight: 500;
+ line-height: normal;
+`;
+
export const ButtonTwo = styled.div`
margin-top: 20px;
- margin-left: 30px;
- width: 85%;
- height: 30px;
+ margin-left: 50px;
+ width: 298px;
+ height: 39px;
flex-shrink: 0;
border-radius: 10px;
border: 0.5px solid #fff9c2;
@@ -151,14 +163,68 @@ export const ButtonTwo = styled.div`
cursor: pointer;
`;
-export const ButtonText = styled.div`
- margin-top: 5px;
- color: #000;
- text-align: center;
- font-family: "Gothic A1";
- font-size: 15px;
- font-style: normal;
- font-weight: 500;
- line-height: normal;
+export const ReviewImage = styled.img`
+ width: ${({ type }) => (type === 'bad' ? '58px' : '60px')}; /* 'bad' 이미지 크기 조절 */
+ cursor: pointer;
+ border: ${({ selected }) => (selected ? '2px solid blue' : 'none')}; /* 선택된 이미지에 테두리 추가 */
+`;
+
+//메뉴바 스타일
+export const Backdrop = styled.div`
+ position: absolute;
+ top: 50%;
+ left: 50%;
+ width: 393px;
+ height: 852px;
+ background-color: rgba(0, 0, 0, 0.5);
+ z-index: 1;
+ transform: translate(-50%, -50%);
`;
-//1
\ No newline at end of file
+
+export const DropdownMenu = styled.div`
+ position: absolute;
+ top: 80px;
+ left: 80%;
+ transform: translateX(-50%);
+ width: 50px;
+ height: 314px;
+ border-radius: 50px;
+ background: #fff;
+ box-shadow: 0px 0px 8px 8px #544c4c;
+ padding: 20px;
+ z-index: 11;
+ display: flex;
+ flex-direction: column;
+ justify-content: space-around;
+ align-items: center;
+
+ #mypage {
+ margin-top: 15px;
+ margin-right: 7px;
+ }
+ #myreview {
+ margin-top: 107px;
+ margin-right: 7px;
+ }
+ #mainpage {
+ margin-top: 200px;
+ margin-right: 7px;
+ }
+ #logout {
+ margin-top: 2px;
+ margin-right: 2px;
+ }
+`;
+
+export const DropdownItem = styled.button`
+ background: none;
+ border: none;
+ padding: 10px;
+ font-size: 16px;
+ cursor: pointer;
+ color: #333;
+ width: 100%;
+ text-align: center;
+ border-radius: 50%;
+ transition: background-color 0.3s ease;
+`;
\ No newline at end of file
From 07f49750a0d20ee8e3b0291f14121a63c1bcbdbb Mon Sep 17 00:00:00 2001
From: minyeong3201 <164001002+minyeong3201@users.noreply.github.com>
Date: Sun, 4 Aug 2024 15:31:08 +0900
Subject: [PATCH 7/7] finalmin
---
customfront/src/App.js | 5 +-
customfront/src/page/alarm1.jsx | 2 +-
customfront/src/page/alarm2.jsx | 12 ++--
customfront/src/page/alarm3.jsx | 12 ++--
customfront/src/page/changeinfo.jsx | 2 +-
customfront/src/page/main.jsx | 97 ---------------------------
customfront/src/page/mypage.jsx | 3 +-
customfront/src/page/pwchange1.jsx | 4 +-
customfront/src/page/review.jsx | 2 +-
customfront/src/page/reviewcheck1.jsx | 2 +-
customfront/src/page/reviewcheck2.jsx | 2 +-
customfront/src/page/reviewcheck3.jsx | 2 +-
12 files changed, 27 insertions(+), 118 deletions(-)
delete mode 100644 customfront/src/page/main.jsx
diff --git a/customfront/src/App.js b/customfront/src/App.js
index 748bea05e..18305a880 100644
--- a/customfront/src/App.js
+++ b/customfront/src/App.js
@@ -1,6 +1,5 @@
import React from 'react';
import { BrowserRouter as Router, Routes, Route } from 'react-router-dom';
-import Main from './page/main';
import Main0 from './page/main0';
import Main2 from './page/main2';
import Main3 from './page/main3';
@@ -37,10 +36,10 @@ function App() {
- } /> {/* 기본 경로 처리 */}
+ } /> {/* 기본 경로 처리 */}
+ } />
} />
} />
- } />
} />
} />
} />
diff --git a/customfront/src/page/alarm1.jsx b/customfront/src/page/alarm1.jsx
index ad5f24050..4d5c4c1ee 100644
--- a/customfront/src/page/alarm1.jsx
+++ b/customfront/src/page/alarm1.jsx
@@ -11,7 +11,7 @@ const Alarm1 = () => {
};
const goMain2 = () => {
- navigate(`/`);
+ navigate(`/Main2`);
};
const goAlarm1 = () => {
diff --git a/customfront/src/page/alarm2.jsx b/customfront/src/page/alarm2.jsx
index 4490f5174..6ce72c0f6 100644
--- a/customfront/src/page/alarm2.jsx
+++ b/customfront/src/page/alarm2.jsx
@@ -6,8 +6,12 @@ const Alarm2 = () => {
const navigate = useNavigate();
const [isMenuOpen, setIsMenuOpen] = useState(false);
- const goMain = () => {
- navigate(`/`);
+ const goMain0 = () => {
+ navigate(`/Main0`);
+ };
+
+ const goMain2 = () => {
+ navigate(`/Main2`);
};
const goChangeinfo = () => {
@@ -42,7 +46,7 @@ const Alarm2 = () => {
src={`${process.env.PUBLIC_URL}/logo/ylogo.svg`}
alt="logo"
width="40px"
- onClick={goMain}
+ onClick={goMain2}
/>
{
onClick={toggleMenu}
/>
-
+
{
const navigate = useNavigate();
const [isMenuOpen, setIsMenuOpen] = useState(false);
- const goMain = () => {
- navigate(`/`);
+ const goMain0 = () => {
+ navigate(`/Main0`);
+ };
+
+ const goMain2 = () => {
+ navigate(`/Main2`);
};
const toggleMenu = () => {
@@ -38,7 +42,7 @@ const Alarm3 = () => {
src={`${process.env.PUBLIC_URL}/logo/ylogo.svg`}
alt="logo"
width="40px"
- onClick={goMain}
+ onClick={goMain2}
/>
{
onClick={toggleMenu}
/>
-
+
{
};
const goMain2 = () => {
- navigate(`/`);
+ navigate(`/Main2`);
};
const goMypage = () => {
diff --git a/customfront/src/page/main.jsx b/customfront/src/page/main.jsx
deleted file mode 100644
index 1cac62158..000000000
--- a/customfront/src/page/main.jsx
+++ /dev/null
@@ -1,97 +0,0 @@
-import React from "react";
-import { useNavigate } from "react-router-dom";
-import * as a from "../style/styledmain";
-
-const Main = () => {
- const navigate = useNavigate();
-
- const goMain = () => {
- navigate(`/main`);
- };
-
- const goHome = () => {
- navigate(`/home`);
- };
-
- return (
-
-
-
navigate(-1)}
- />
-
-
navigate(-1)}
- />
- navigate(-1)}
- />
-
-
-
-
-
-
- 000님에게 맞는
- 식품을 찾아볼까요?
-
-
-
- #당뇨
- #체중감소
- #단백질이 좋아
-
-
-
-
-
-
-
-
- );
-};
-
-export default Main;
diff --git a/customfront/src/page/mypage.jsx b/customfront/src/page/mypage.jsx
index 42fdf5232..f30d5b8ed 100644
--- a/customfront/src/page/mypage.jsx
+++ b/customfront/src/page/mypage.jsx
@@ -29,7 +29,7 @@ const Mypage = () => {
};
const goMain2 = () => {
- navigate(`/`);
+ navigate(`/Main2`);
};
const goMypage = () => {
@@ -138,7 +138,6 @@ const Mypage = () => {
return mapping[key] || key;
};
- // userInfo가 로드되지 않았거나 에러가 발생한 경우 로딩 상태 표시
if (!userInfo) {
return Loading...
;
}
diff --git a/customfront/src/page/pwchange1.jsx b/customfront/src/page/pwchange1.jsx
index d37ab4266..4e10eaa61 100644
--- a/customfront/src/page/pwchange1.jsx
+++ b/customfront/src/page/pwchange1.jsx
@@ -5,8 +5,8 @@ import * as p1 from "../style/styledpwchange1";
const Pwchange1 = () => {
const navigate = useNavigate();
- const goMain = () => {
- navigate(`/`);
+ const goMain2 = () => {
+ navigate(`/Main2`);
};
return (
diff --git a/customfront/src/page/review.jsx b/customfront/src/page/review.jsx
index b1df08585..19faffb60 100644
--- a/customfront/src/page/review.jsx
+++ b/customfront/src/page/review.jsx
@@ -15,7 +15,7 @@ const Review = () => {
const [userInfo, setUserInfo] = useState(null);
const goMain2 = () => {
- navigate(`/`);
+ navigate(`/Main2`);
};
const goMain0 = () => {
diff --git a/customfront/src/page/reviewcheck1.jsx b/customfront/src/page/reviewcheck1.jsx
index e669e36c3..65203692b 100644
--- a/customfront/src/page/reviewcheck1.jsx
+++ b/customfront/src/page/reviewcheck1.jsx
@@ -33,7 +33,7 @@ const Reviewcheck1 = () => {
};
const goMain2 = () => {
- navigate(`/`);
+ navigate(`/Main2`);
};
const goReview = () => {
diff --git a/customfront/src/page/reviewcheck2.jsx b/customfront/src/page/reviewcheck2.jsx
index 11fd26000..21b639c30 100644
--- a/customfront/src/page/reviewcheck2.jsx
+++ b/customfront/src/page/reviewcheck2.jsx
@@ -11,7 +11,7 @@ const Reviewcheck2 = () => {
const [productData, setProductData] = useState(null);
const goMain2 = () => {
- navigate(`/`);
+ navigate(`/Main2`);
};
const goMain0 = () => {
diff --git a/customfront/src/page/reviewcheck3.jsx b/customfront/src/page/reviewcheck3.jsx
index 803ebeef1..ed3bbeef0 100644
--- a/customfront/src/page/reviewcheck3.jsx
+++ b/customfront/src/page/reviewcheck3.jsx
@@ -12,7 +12,7 @@ const Reviewcheck3 = () => {
const [selectedImage, setSelectedImage] = useState(null); // 선택된 이미지 상태 추가
const goMain2 = () => {
- navigate(`/`);
+ navigate(`/Main2`);
};
const goMain0 = () => {