Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[김희주] sprint 5 #43

Open
wants to merge 2 commits into
base: react-김희주
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 0 additions & 27 deletions .github/pull-request-template.md

This file was deleted.

31 changes: 0 additions & 31 deletions .github/workflows/auto-label-assign.yml

This file was deleted.

50 changes: 50 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
# 🐼 판다마켓 프로젝트

> _이 저장소는 판다마켓 프로젝트의 프론트엔드 코드를 관리하는 곳입니다. 프로젝트를 클론하여 개발 환경을 설정하고, 각 브랜치에서 해당 스프린트 미션을 수행해 주세요!_ 🛠️

## 소개

안녕하세요! 판다마켓 프로젝트에 오신 것을 환영합니다! 🥳
판다마켓은 따뜻한 중고거래를 위한 커뮤니티 플랫폼이에요. 여러분은 이곳에서 상품을 등록하고, 다른 사용자들과 소통하며, 자유롭게 이야기를 나눌 수 있어요. 매주 스프린트 미션을 통해 기능을 하나씩 만들어 가며 성장해 나가는 여정을 함께해요. 🚀

![PandaMarket](https://github.com/user-attachments/assets/3784b99f-73c9-4349-a9a9-92b2a7563574)
_위 이미지는 판다마켓의 대표 이미지입니다._ 📸

## 스프린트 미션이란? 🤔

스프린트 미션은 **하나의 개인 프로젝트를 길게 진행하면서, 그 과정에서 주기적으로 피드백을 받을 수 있는 시스템**이에요. 각 스프린트마다 배운 이론을 적용해 보고, **멘토님께 코드 리뷰를 받아가며 실력을 쑥쑥 키워갈 수 있는 중요한 개인 과제**랍니다. 💪

## 주요 기능 ✨

1. **상품 등록**: 내가 가진 물건을 올리고, 사진과 설명을 추가해 직접 판매할 수 있어요!
2. **문의 댓글**: 상품에 대한 궁금한 점이나 의견을 자유롭게 남길 수 있답니다. 📝
3. **자유게시판**: 다양한 주제로 친구들과 이야기를 나누고, 정보를 공유할 수 있는 공간이에요! 🗣️

## 프로젝트 브랜치 구조 🏗️

프로젝트는 단계별로 나뉘어 있고, 각 스프린트 미션에 맞는 브랜치가 있어요. 각 브랜치를 통해 체계적으로 개발하며 학습할 수 있어요. 🎯

### 브랜치 설명

1. **basic (part1): 스프린트 미션 1 ~ 4 FE 요구사항**

- 기본적인 웹 애플리케이션 기능 구현을 위한 초기 브랜치입니다. HTML, CSS, JavaScript 등을 사용해 기본을 다집니다.
- **스프린트 미션 1부터 4까지**의 프론트엔드 내용을 포함하고 있어요.

2. **react (part2): 스프린트 미션 5 ~ 7 FE 요구사항**

- React 라이브러리를 사용해 프론트엔드 기능을 구현하는 브랜치입니다. 컴포넌트 기반 아키텍처와 상태 관리를 배웁니다.
- **스프린트 미션 5부터 7까지, 그 이후**의 프론트엔드 내용을 포함하고 있어요.
- 만약 스프린트 미션 9부터 프론트엔드 코드를 Next가 아닌 React로 구현하고 싶다면 react 브랜치를 사용해요.

3. **next (part3,4): 스프린트 미션 8 FE 요구사항~**

- Next.js를 사용해 서버 사이드 렌더링(SSR)과 정적 사이트 생성(SSG) 등 고급 기능을 구현합니다.
- **스프린트 미션 8부터** 시작하는 프론트엔드 내용을 포함하고 있어요.
- 만약 스프린트 미션 9부터 프론트엔드 코드를 React가 아닌 Next로 구현하고 싶다면 next 브랜치를 사용해요.

> _스프린트 미션 내 백엔드 요구사항은 [백엔드 레포지토리](https://github.com/codeit-sprint-fullstack/2-Sprint-mission-Be)의 브랜치에서 관리해주세요_

---

본 프로젝트는 [코드잇](https://www.codeit.kr)의 소유이며, 교육 목적으로만 사용됩니다. © 2024 Codeit. All rights reserved.
13 changes: 13 additions & 0 deletions package-lock.json

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

18 changes: 18 additions & 0 deletions public/App.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
const BASE_URL = "https://panda-market-api.vercel.app";

export const getProducts = async ({
page = 1,
pageSize = 4,
orderBy = "",
keyword = "",
}) => {
const query = `page=${page}&pageSize=${pageSize}&orderBy=${orderBy}&keyword=${keyword}`;
const res = await fetch(`${BASE_URL}/products?${query}`);

if (!res.ok) {
throw new Error("상품 목록 조회에 실패하였습니다");
}
const data = await res.json();

return data;
};
Empty file added public/index.html
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

여기에 기본 html과 index.js 에 react 기본 파일들 추가해주세요 ㅎㅎ
https://github.com/react-cosmos/create-react-app-example/blob/master/public/index.html

Empty file.
Empty file added public/index.js
Empty file.
18 changes: 18 additions & 0 deletions src/components/bestproduct.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
import React from "react";

const BestProducts = ({ products }) => (
<section className="best-products">
<h2>베스트 상품</h2>
<div className="product-grid">
{products.map((product) => (
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

요렇게 써도 좋지만 구조 분해 할당으로 해도 좋을것 같아요 ㅎㅎ
이미 잘 쓰고 계시지만, 참고용으로 남겨놓습니다.
{products.map(({ id, image, name }) => (

https://developer.mozilla.org/ko/docs/Web/JavaScript/Reference/Operators/Destructuring_assignment

<div className="product-card" key={product.id}>
<img src={product.image} alt={product.name} />
<h3>{product.name}</h3>
<p>{product.price}원</p>
</div>
))}
</div>
</section>
);

export default BestProducts;
27 changes: 27 additions & 0 deletions src/components/footer.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
import React from "react";

const Footer = () => (
<footer>
<p>&copy; codetit - 2024</p>
<nav>
<a href="/">Privacy Policy</a>
<a href="/">FAQ</a>
</nav>
<div className="social-links">
<a href="https://www.facebook.com/" target="_blank">
<img src="/src/png/facebook.png" />
</a>
<a href="https://www.x.com/" target="_blank">
<img src="/src/png/twitter.png" />
</a>
<a href="https://www.youtube.com/" target="_blank">
<img src="/src/png/youtube.png" />
</a>
<a href="https://www.instagram.com/" target="_blank">
<img src="/src/png/insta.png" />
</a>
</div>
</footer>
);

export default Footer;
16 changes: 16 additions & 0 deletions src/components/navigator.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
import React from 'react';

const Navigator = () => (
<header>
<div className="logo">
<img src="/src/png/logo" />
</div>
<nav>
<a href="/">자유게시판</a>
<a href="/">중고마켓</a>
</nav>
<button className="login-btn">로그인</button>
</header>
);

export default Navigator;
Binary file added src/png/facebook.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/png/insta.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/png/logo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/png/twitter.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/png/youtube.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.