-
Notifications
You must be signed in to change notification settings - Fork 20
[김희진] sprint5 #47
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
The head ref may contain hidden characters: "React-\uAE40\uD76C\uC9C4-sprint1"
[김희진] sprint5 #47
Changes from all commits
878a0c5
2c7135b
fe519b3
03e3fd1
2a76b98
2ee5239
d205c6d
5abb1dc
f85cfb4
bc72369
97fdc50
91fec04
ffcad5a
b15eb8f
1cf185f
f9aa69d
cf115a7
6a13c63
59096cc
b2a7e07
0c398f8
a9922f0
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -4,6 +4,7 @@ | |
| /node_modules | ||
| /.pnp | ||
| .pnp.js | ||
| .env | ||
|
|
||
| # testing | ||
| /coverage | ||
|
|
||
Large diffs are not rendered by default.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,43 +1,12 @@ | ||
| <!DOCTYPE html> | ||
| <html lang="en"> | ||
| <html lang="ko"> | ||
| <head> | ||
| <meta charset="utf-8" /> | ||
| <link rel="icon" href="%PUBLIC_URL%/favicon.ico" /> | ||
| <meta name="viewport" content="width=device-width, initial-scale=1" /> | ||
| <meta name="theme-color" content="#000000" /> | ||
| <meta | ||
| name="description" | ||
| content="Web site created using create-react-app" | ||
| /> | ||
| <link rel="apple-touch-icon" href="%PUBLIC_URL%/logo192.png" /> | ||
| <!-- | ||
| manifest.json provides metadata used when your web app is installed on a | ||
| user's mobile device or desktop. See https://developers.google.com/web/fundamentals/web-app-manifest/ | ||
| --> | ||
| <link rel="manifest" href="%PUBLIC_URL%/manifest.json" /> | ||
| <!-- | ||
| Notice the use of %PUBLIC_URL% in the tags above. | ||
| It will be replaced with the URL of the `public` folder during the build. | ||
| Only files inside the `public` folder can be referenced from the HTML. | ||
|
|
||
| Unlike "/favicon.ico" or "favicon.ico", "%PUBLIC_URL%/favicon.ico" will | ||
| work correctly both with client-side routing and a non-root public URL. | ||
| Learn how to configure a non-root public URL by running `npm run build`. | ||
| --> | ||
| <title>React App</title> | ||
| <link rel="icon" href="../src/assets/icons/panda.svg" /> | ||
| <title>Panda Market</title> | ||
| </head> | ||
| <body> | ||
| <noscript>You need to enable JavaScript to run this app.</noscript> | ||
| <div id="root"></div> | ||
| <!-- | ||
| This HTML file is a template. | ||
| If you open it directly in the browser, you will see an empty page. | ||
|
|
||
| You can add webfonts, meta tags, or analytics to this file. | ||
| The build step will place the bundled scripts into the <body> tag. | ||
|
|
||
| To begin the development, run `npm start` or `yarn start`. | ||
| To create a production bundle, use `npm run build` or `yarn build`. | ||
| --> | ||
| </body> | ||
| </html> |
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,11 @@ | ||
| import Router from "./components/Router"; | ||
|
|
||
| function App() { | ||
| return ( | ||
| <> | ||
| <Router /> | ||
| </> | ||
| ); | ||
| } | ||
|
|
||
| export default App; |
This file was deleted.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,12 @@ | ||
| import axios from "axios"; | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. instacne를 설정하셔서 사용하시는걸 추천드려요 !어떻게 세팅하면 될까? 🤔
const baseURL = process.env.NEXT_PUBLIC_LINKBRARY_BaseURL;
const instance = axios.create({
baseURL: baseURL,
headers: {
'Content-Type': 'application/json',
},
});
export default instance |
||
|
|
||
| const BASE_URL = process.env.REACT_APP_BASE_URL; | ||
|
|
||
| export async function getProducts(params) { | ||
| const { page, pageSize, orderBy, keyword } = params; | ||
| const response = await axios.get(`${BASE_URL}/products`, { | ||
| params: { page, pageSize, orderBy, keyword }, | ||
| }); | ||
|
|
||
| return response.data; | ||
| } | ||
|
Comment on lines
+3
to
+12
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 크으 ~ 정말 깔끔한 API관리 ! 😊
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,39 @@ | ||
| import * as S from "./AllItems.styles"; | ||
| import ItemCard from "../ItemCard/ItemCard"; | ||
| import Dropdown from "../../common/Dropdown/Dropdown"; | ||
| import { Link } from "react-router-dom"; | ||
| import Search from "../../Search/Search"; | ||
| import NoneItem from "../../NoneItem/NoneItem"; | ||
|
|
||
| const list = ["최신순", "좋아요순"]; | ||
|
|
||
| export default function AllItems({ items, sortOption, onChange, setKeyword }) { | ||
| return ( | ||
| <S.AllContainer> | ||
| <S.AllHeader> | ||
| <S.Div> | ||
| <S.Title>전체 상품</S.Title> | ||
| <Link to="/addItem"> | ||
| <S.AddBtnForMedia>상품 등록하기</S.AddBtnForMedia> | ||
| </Link> | ||
| </S.Div> | ||
| <S.Filter> | ||
| <Search onSearch={setKeyword} /> | ||
| <Link to="/addItem"> | ||
| <S.AddBtn>상품 등록하기</S.AddBtn> | ||
| </Link> | ||
| <Dropdown sortOption={sortOption} list={list} onChange={onChange} /> | ||
| </S.Filter> | ||
| </S.AllHeader> | ||
| {items.length !== 0 ? ( | ||
| <S.ItemCardContainer> | ||
| {items.map((items, idx) => ( | ||
| <ItemCard key={idx} list="all" {...items} /> | ||
| ))} | ||
| </S.ItemCardContainer> | ||
| ) : ( | ||
| <NoneItem /> | ||
| )} | ||
| </S.AllContainer> | ||
| ); | ||
| } | ||
|
Comment on lines
+10
to
+39
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 크으 ~ 깔끔하네요.컴포넌트를 선언하고 |
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
굿굿 !
.env파일을 작성하고 형상관리에서 제외하셨군요 ! 👍