From 4a21f72260aced42a538cec81534eabdb7b5dcdf Mon Sep 17 00:00:00 2001 From: Jinhan Date: Sat, 9 Nov 2024 17:39:22 +0900 Subject: [PATCH] =?UTF-8?q?=EB=A9=98=ED=86=A0=EB=A7=81=20=EC=88=98?= =?UTF-8?q?=EC=A0=95=20=EC=82=AC=ED=95=AD=20=EB=B0=98=EC=98=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- sprint6/package-lock.json | 29 +++ sprint6/package.json | 1 + sprint6/public/index.html | 2 +- sprint6/src/api/getProductsApi.js | 2 +- sprint6/src/api/postProductApi.js | 9 +- sprint6/src/components/Footer/index.jsx | 2 +- sprint6/src/components/Header/index.css | 19 +- sprint6/src/components/Header/index.jsx | 2 +- .../CommunityFeedPage/CommunityFeedPage.jsx | 1 + .../pages/HomePage/component/Header/index.css | 19 +- .../HomePage/component/Section3/index.jsx | 4 +- .../HomePage/component/UnderBanner/index.jsx | 8 +- sprint6/src/pages/HomePage/index.jsx | 4 +- .../ItemsPage/component/Header/index.css | 177 ----------------- .../ItemsPage/component/Header/index.jsx | 44 ----- sprint6/src/pages/ItemsPage/index.css | 2 +- sprint6/src/pages/ItemsPage/index.jsx | 2 +- .../components/Header/index.css | 182 ------------------ .../components/Header/index.jsx | 38 ---- .../ProdDescriptionInputBox/index.jsx | 4 +- .../components/ProdNameInputBox/index.jsx | 11 +- .../components/ProdPriceInputBox/index.jsx | 13 +- .../components/ProdTagsInputBox/index.jsx | 11 +- sprint6/src/pages/RegisterItemPage/index.css | 4 - sprint6/src/pages/RegisterItemPage/index.jsx | 21 +- 25 files changed, 84 insertions(+), 527 deletions(-) delete mode 100644 sprint6/src/pages/ItemsPage/component/Header/index.css delete mode 100644 sprint6/src/pages/ItemsPage/component/Header/index.jsx delete mode 100644 sprint6/src/pages/RegisterItemPage/components/Header/index.css delete mode 100644 sprint6/src/pages/RegisterItemPage/components/Header/index.jsx diff --git a/sprint6/package-lock.json b/sprint6/package-lock.json index 6dc8c24f..eaeb0434 100644 --- a/sprint6/package-lock.json +++ b/sprint6/package-lock.json @@ -11,6 +11,7 @@ "@testing-library/jest-dom": "^5.17.0", "@testing-library/react": "^13.4.0", "@testing-library/user-event": "^13.5.0", + "axios": "^1.7.7", "react": "^18.3.1", "react-dom": "^18.3.1", "react-router-dom": "^6.27.0", @@ -5346,6 +5347,29 @@ "node": ">=4" } }, + "node_modules/axios": { + "version": "1.7.7", + "resolved": "https://registry.npmjs.org/axios/-/axios-1.7.7.tgz", + "integrity": "sha512-S4kL7XrjgBmvdGut0sN3yJxqYzrDOnivkBiN0OFs6hLiUam3UPvswUo0kqGyhqUZGEOytHyumEdXsAkgCOUf3Q==", + "dependencies": { + "follow-redirects": "^1.15.6", + "form-data": "^4.0.0", + "proxy-from-env": "^1.1.0" + } + }, + "node_modules/axios/node_modules/form-data": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/form-data/-/form-data-4.0.1.tgz", + "integrity": "sha512-tzN8e4TX8+kkxGPK8D5u0FNmjPUjw3lwC9lSLxxoB/+GtsJG91CO8bSWy73APlgAZzZbXEYZJuxjkHH2w+Ezhw==", + "dependencies": { + "asynckit": "^0.4.0", + "combined-stream": "^1.0.8", + "mime-types": "^2.1.12" + }, + "engines": { + "node": ">= 6" + } + }, "node_modules/axobject-query": { "version": "4.1.0", "resolved": "https://registry.npmjs.org/axobject-query/-/axobject-query-4.1.0.tgz", @@ -14579,6 +14603,11 @@ "node": ">= 0.10" } }, + "node_modules/proxy-from-env": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/proxy-from-env/-/proxy-from-env-1.1.0.tgz", + "integrity": "sha512-D+zkORCbA9f1tdWRK0RaCR3GPv50cMxcrz4X8k5LTSUD1Dkw47mKJEZQNunItRTkWwgtaUSo1RVFRIG9ZXiFYg==" + }, "node_modules/psl": { "version": "1.9.0", "resolved": "https://registry.npmjs.org/psl/-/psl-1.9.0.tgz", diff --git a/sprint6/package.json b/sprint6/package.json index 264167be..0d9eda75 100644 --- a/sprint6/package.json +++ b/sprint6/package.json @@ -6,6 +6,7 @@ "@testing-library/jest-dom": "^5.17.0", "@testing-library/react": "^13.4.0", "@testing-library/user-event": "^13.5.0", + "axios": "^1.7.7", "react": "^18.3.1", "react-dom": "^18.3.1", "react-router-dom": "^6.27.0", diff --git a/sprint6/public/index.html b/sprint6/public/index.html index d06a3a29..0f097090 100644 --- a/sprint6/public/index.html +++ b/sprint6/public/index.html @@ -3,7 +3,7 @@ - + 중고마켓 diff --git a/sprint6/src/api/getProductsApi.js b/sprint6/src/api/getProductsApi.js index f03b7072..e0a1ef0f 100644 --- a/sprint6/src/api/getProductsApi.js +++ b/sprint6/src/api/getProductsApi.js @@ -1,6 +1,6 @@ import { url } from './endpoint.js'; -async function getProducts(params = []) { +async function getProducts(params = "") { const query = new URLSearchParams(params).toString(); // 파라미터를 자동으로 정리해서 인코딩 diff --git a/sprint6/src/api/postProductApi.js b/sprint6/src/api/postProductApi.js index 78ae34ae..b4cef47f 100644 --- a/sprint6/src/api/postProductApi.js +++ b/sprint6/src/api/postProductApi.js @@ -2,8 +2,13 @@ import axios from 'axios'; import { postUrl } from './endpoint.js'; const postProduct = async (surveyData) => { - const res = await axios.post(postUrl, surveyData); - return res.data; + if (typeof surveyData === 'object') { + const res = await axios.post(postUrl, surveyData); + return res.data; + } else { + console.error('Post error:'); + return; + } } export default postProduct; \ No newline at end of file diff --git a/sprint6/src/components/Footer/index.jsx b/sprint6/src/components/Footer/index.jsx index 7b9b1dd3..ccd7b2c4 100644 --- a/sprint6/src/components/Footer/index.jsx +++ b/sprint6/src/components/Footer/index.jsx @@ -19,7 +19,7 @@ function Footer() { Facebook Twitter YouTube - Instagram + Instagram diff --git a/sprint6/src/components/Header/index.css b/sprint6/src/components/Header/index.css index 4f97f80a..bd07add1 100644 --- a/sprint6/src/components/Header/index.css +++ b/sprint6/src/components/Header/index.css @@ -1,20 +1,3 @@ -:root { - /* Gray scale */ - --gray-900: #1b1d1f; - --gray-800: #26282b; - --gray-600: #454c53; - --gray-500: #72787f; - --gray-400: #9ea4a8; - --gray-200: #e5e7eb; - --gray-100: #e8ebed; - --gray-50: #f7f7f8; - - /* Primary color */ - --mainColor: #3692ff; - - --header-height: 70px; -} - .nav { position: fixed; height: 7rem; @@ -75,7 +58,7 @@ min-width: 12.8rem; height: 4.8rem; border-radius: 0.8rem; - background-color: var(--mainColor); + background-color: #3692FF; display: flex; justify-content: center; align-items: center; diff --git a/sprint6/src/components/Header/index.jsx b/sprint6/src/components/Header/index.jsx index b609888d..b66585eb 100644 --- a/sprint6/src/components/Header/index.jsx +++ b/sprint6/src/components/Header/index.jsx @@ -3,7 +3,7 @@ import "./index.css"; import pandaLogoImg from "../../img/logo/panda-market-logo.png"; import pandaLogoTextImg from '../../img/logo/panda-text-log.png'; -const getLinkStyle = (isActive) => { +const getLinkStyle = ({isActive}) => { return { color: isActive ? "#3692FF" : undefined, }; diff --git a/sprint6/src/pages/CommunityFeedPage/CommunityFeedPage.jsx b/sprint6/src/pages/CommunityFeedPage/CommunityFeedPage.jsx index 60f3d3be..685a2a1f 100644 --- a/sprint6/src/pages/CommunityFeedPage/CommunityFeedPage.jsx +++ b/sprint6/src/pages/CommunityFeedPage/CommunityFeedPage.jsx @@ -1,5 +1,6 @@ import React from "react"; +// 커뮤니티 페이지 나중에 들어감. function CommunityFeedPage() { return
CommunityFeedPage
; } diff --git a/sprint6/src/pages/HomePage/component/Header/index.css b/sprint6/src/pages/HomePage/component/Header/index.css index 8009b884..b27dbde2 100644 --- a/sprint6/src/pages/HomePage/component/Header/index.css +++ b/sprint6/src/pages/HomePage/component/Header/index.css @@ -1,20 +1,3 @@ -:root { - /* Gray scale */ - --gray-900: #1b1d1f; - --gray-800: #26282b; - --gray-600: #454c53; - --gray-500: #72787f; - --gray-400: #9ea4a8; - --gray-200: #e5e7eb; - --gray-100: #e8ebed; - --gray-50: #f7f7f8; - - /* Primary color */ - --mainColor: #3692ff; - - --header-height: 70px; -} - .nav { position: fixed; height: 7rem; @@ -74,7 +57,7 @@ min-width: 12.8rem; height: 4.8rem; border-radius: 0.8rem; - background-color: var(--mainColor); + background-color: #3692FF; display: flex; justify-content: center; align-items: center; diff --git a/sprint6/src/pages/HomePage/component/Section3/index.jsx b/sprint6/src/pages/HomePage/component/Section3/index.jsx index 18050837..320cee84 100644 --- a/sprint6/src/pages/HomePage/component/Section3/index.jsx +++ b/sprint6/src/pages/HomePage/component/Section3/index.jsx @@ -3,7 +3,7 @@ import "./index.css"; import "../common/common.css"; import section3Img from "../../../../img/home/feature3-image.png"; -const Section2 = () => { +const Section3 = () => { return (
@@ -30,4 +30,4 @@ const Section2 = () => { ); }; -export default Section2; +export default Section3; diff --git a/sprint6/src/pages/HomePage/component/UnderBanner/index.jsx b/sprint6/src/pages/HomePage/component/UnderBanner/index.jsx index 3fa2319f..2a1938b9 100644 --- a/sprint6/src/pages/HomePage/component/UnderBanner/index.jsx +++ b/sprint6/src/pages/HomePage/component/UnderBanner/index.jsx @@ -1,9 +1,9 @@ import "../../../../styles/global.css"; import "./index.css"; import "../common/common.css"; -import bottomBannerImg from "../../../../img/home/bottom-banner-image.png"; +import UnderBannerImg from "../../../../img/home/bottom-banner-image.png"; -const BottomBanner = () => { +const UnderBanner = () => { return (
@@ -12,11 +12,11 @@ const BottomBanner = () => {
판다마켓 중고 거래
- bottomBannerImg + UnderBannerImg
); }; -export default BottomBanner; +export default UnderBanner; diff --git a/sprint6/src/pages/HomePage/index.jsx b/sprint6/src/pages/HomePage/index.jsx index 49c0e1c1..d62d5f50 100644 --- a/sprint6/src/pages/HomePage/index.jsx +++ b/sprint6/src/pages/HomePage/index.jsx @@ -5,7 +5,7 @@ import Hero from "./component/Hero/index.jsx"; import Section1 from "./component/Section1/index.jsx"; import Section2 from "./component/Section2/index.jsx"; import Section3 from "./component/Section3/index.jsx"; -import BottomBanner from "./component/UnderBanner/index.jsx"; +import UnderBanner from "./component/UnderBanner/index.jsx"; import Footer from "../../components/Footer/index.jsx"; @@ -18,7 +18,7 @@ function HomePage() { - +