Skip to content

Commit

Permalink
멘토링 수정 사항 반영
Browse files Browse the repository at this point in the history
  • Loading branch information
Jin-coding-333 committed Nov 9, 2024
1 parent c3e1cf4 commit 4a21f72
Show file tree
Hide file tree
Showing 25 changed files with 84 additions and 527 deletions.
29 changes: 29 additions & 0 deletions sprint6/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions sprint6/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
2 changes: 1 addition & 1 deletion sprint6/public/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

<head>
<meta charset="utf-8" />
<link rel="icon" href="../src/img/favicon.ico" />
<link rel="icon" href="../src/img/icons/favicon.ico" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<title>중고마켓</title>
</head>
Expand Down
2 changes: 1 addition & 1 deletion sprint6/src/api/getProductsApi.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { url } from './endpoint.js';

async function getProducts(params = []) {
async function getProducts(params = "") {
const query = new URLSearchParams(params).toString();
// 파라미터를 자동으로 정리해서 인코딩

Expand Down
9 changes: 7 additions & 2 deletions sprint6/src/api/postProductApi.js
Original file line number Diff line number Diff line change
Expand Up @@ -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;
2 changes: 1 addition & 1 deletion sprint6/src/components/Footer/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ function Footer() {
<a href="https://www.facebook.com/?locale=ko_KR"><img src={faceBookImg} alt="Facebook" /></a>
<a href="https://x.com/?lang=ko"><img src={twitterImg} alt="Twitter" /></a>
<a href="https://www.youtube.com/"><img src={youtubeImg} alt="YouTube" /></a>
<a href="https://www.instagram.com/sem/campaign/emailsignup/?campaign_id=13530338586&extra_1=s%7Cc%7C547419126947%7Ce%7Cinstagram%20c%7C&placement=&creative=547419126947&keyword=instagram%20c&partner_id=googlesem&extra_2=campaignid%3D13530338586%26adgroupid%3D126262419014%26matchtype%3De%26network%3Dg%26source%3Dnotmobile%26search_or_content%3Ds%26device%3Dc%26devicemodel%3D%26adposition%3D%26target%3D%26targetid%3Dkwd-1321618852491%26loc_physical_ms%3D1009866%26loc_interest_ms%3D%26feeditemid%3D%26param1%3D%26param2%3D&gad_source=1&gclid=CjwKCAjw_4S3BhAAEiwA_64YhgkFInpQexBqyLXjThDfjkEHXMlvBam2vK2b7L7e_xsKy934puQxuBoCe7IQAvD_BwE"><img src={instagramImg} alt="Instagram" /></a>
<a href="https://www.instagram.com/sem/campaign/emailsignup"><img src={instagramImg} alt="Instagram" /></a>
</div>
</div>
</footer>
Expand Down
19 changes: 1 addition & 18 deletions sprint6/src/components/Header/index.css
Original file line number Diff line number Diff line change
@@ -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;
Expand Down Expand Up @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion sprint6/src/components/Header/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -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,
};
Expand Down
1 change: 1 addition & 0 deletions sprint6/src/pages/CommunityFeedPage/CommunityFeedPage.jsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import React from "react";

// 커뮤니티 페이지 나중에 들어감.
function CommunityFeedPage() {
return <div>CommunityFeedPage</div>;
}
Expand Down
19 changes: 1 addition & 18 deletions sprint6/src/pages/HomePage/component/Header/index.css
Original file line number Diff line number Diff line change
@@ -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;
Expand Down Expand Up @@ -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;
Expand Down
4 changes: 2 additions & 2 deletions sprint6/src/pages/HomePage/component/Section3/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import "./index.css";
import "../common/common.css";
import section3Img from "../../../../img/home/feature3-image.png";

const Section2 = () => {
const Section3 = () => {
return (
<section class="whiteColorSection">
<div class="content3">
Expand All @@ -30,4 +30,4 @@ const Section2 = () => {
);
};

export default Section2;
export default Section3;
8 changes: 4 additions & 4 deletions sprint6/src/pages/HomePage/component/UnderBanner/index.jsx
Original file line number Diff line number Diff line change
@@ -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 (
<div class="skyColorSection">
<div class="skyColorContent">
Expand All @@ -12,11 +12,11 @@ const BottomBanner = () => {
<div class="text1">판다마켓 중고 거래</div>
</div>
<div class="imgBox">
<img src={bottomBannerImg} alt="bottomBannerImg" />
<img src={UnderBannerImg} alt="UnderBannerImg" />
</div>
</div>
</div>
);
};

export default BottomBanner;
export default UnderBanner;
4 changes: 2 additions & 2 deletions sprint6/src/pages/HomePage/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -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";


Expand All @@ -18,7 +18,7 @@ function HomePage() {
<Section1 />
<Section2 />
<Section3 />
<BottomBanner />
<UnderBanner />
</main>
<Footer />
</>
Expand Down
Loading

0 comments on commit 4a21f72

Please sign in to comment.