-
Notifications
You must be signed in to change notification settings - Fork 1
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
feat:#21-목록페이 html,css추가 #22
Closed
Closed
Changes from 1 commit
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
e362fb2
feat:#21-목록페이 html,css추가
binjin0 34d67db
design:#21-목록페이지 디자인 수정
binjin0 743fa58
feat:#21-기능추가
binjin0 9c6c4dc
set:#21-eslist, prettier 설정
binjin0 37735ff
chore:#10-sell-status 삭제
binjin0 4c4c82b
chore:#21-주석수정
binjin0 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
import React from "react"; | ||
import * as S from "../styles/ProductCardStyle"; | ||
import { useRecoilState } from "recoil"; | ||
import { postsState } from "../recoil/RecoilWastes"; | ||
import { LuCalendarDays } from "react-icons/lu"; | ||
import { GoHeart } from "react-icons/go"; | ||
|
||
const ProductCard = () => { | ||
const [posts, setPosts] = useRecoilState(postsState); | ||
return ( | ||
<S.Container> | ||
{posts.map((wastes) => ( | ||
<div key={wastes.id} className="card"> | ||
<div className="product-box"> | ||
<img src="https://placehold.jp/300x300.png" alt="임시이미지" /> | ||
<div> | ||
<div className=" title">{wastes.title}</div> | ||
<div className=" content"> | ||
<div className="adrress"> | ||
<div className="state">{wastes.address.state}</div> | ||
<div className="city">{wastes.address.city}</div> | ||
</div> | ||
<div className="day"> | ||
<LuCalendarDays /> | ||
<div className="created-at">{wastes.created_at}</div> | ||
</div> | ||
</div> | ||
<div className=" price">{wastes.waste_price}원</div> | ||
</div> | ||
</div> | ||
<div className="card-bottom"> | ||
<p>{wastes.sell_status} </p> | ||
<GoHeart size="30" /> | ||
</div> | ||
<div>{wastes.likes}</div> | ||
|
||
{/* <button onClick={() => handleDelete(wastes.id)}>삭제</button> */} | ||
</div> | ||
))} | ||
</S.Container> | ||
); | ||
}; | ||
|
||
export default ProductCard; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,207 @@ | ||
import styled from "styled-components"; | ||
|
||
export const Container = styled.div` | ||
display: grid; | ||
grid-template-columns: 20rem 20rem 20rem; | ||
gap: 70px; | ||
justify-content: center; | ||
.card { | ||
border: 1px solid var(--grey-box); | ||
padding: 1.5rem; | ||
box-sizing: border-box; | ||
.product-box { | ||
display: flex; | ||
flex-direction: column; | ||
img { | ||
margin-bottom: 2rem; | ||
} | ||
.title { | ||
margin-bottom: 1.5rem; | ||
font-size: 1.3rem; | ||
} | ||
.content { | ||
display: flex; | ||
justify-content: space-between; | ||
margin-bottom: 1.5rem; | ||
.adrress { | ||
display: flex; | ||
.state { | ||
margin-right: 0.5rem; | ||
} | ||
.city { | ||
margin-right: 3rem; | ||
} | ||
} | ||
.day { | ||
display: flex; | ||
.created-at { | ||
margin-left: 0.5rem; | ||
line-height: 1rem; | ||
} | ||
} | ||
} | ||
.price { | ||
font-size: 1.5rem; | ||
font-weight: bold; | ||
} | ||
} | ||
.card-bottom { | ||
display: flex; | ||
justify-content: flex-end; | ||
align-items: center; | ||
gap: 1.5rem; | ||
font-size: 1.5rem; | ||
p { | ||
} | ||
} | ||
} | ||
/* @media (max-width: 1440px) { | ||
display: grid; | ||
grid-template-columns: 22rem 22rem 22rem; | ||
gap: 50px; | ||
justify-content: center; | ||
.card { | ||
padding: 1.5em; | ||
.product-box { | ||
display: flex; | ||
flex-direction: cloumn; | ||
} | ||
.sell-status { | ||
float: right; | ||
font-size: 1.5rem; | ||
} | ||
} | ||
} */ | ||
@media (max-width: 1280px) { | ||
display: grid; | ||
grid-template-columns: 19rem 19rem 19rem; | ||
gap: 40px; | ||
justify-content: center; | ||
.card { | ||
.product-box { | ||
display: flex; | ||
flex-direction: cloumn; | ||
.content { | ||
.adrress { | ||
.state { | ||
margin-right: 0.1rem; | ||
} | ||
.city { | ||
margin-right: 3rem; | ||
} | ||
} | ||
.day { | ||
.created-at { | ||
margin-left: 0.5rem; | ||
line-height: 1rem; | ||
} | ||
} | ||
} | ||
.price { | ||
font-size: 1.2rem; | ||
font-weight: bold; | ||
} | ||
} | ||
.sell-status { | ||
font-size: 1.4rem; | ||
} | ||
} | ||
} | ||
@media (max-width: 1080px) { | ||
display: grid; | ||
grid-template-columns: 40rem; | ||
gap: 70px; | ||
.card { | ||
border-bottom: 1px solid var(--grey-box); | ||
.product-box { | ||
display: flex; | ||
flex-direction: row; | ||
img { | ||
margin-right: 3rem; | ||
} | ||
.title { | ||
margin-bottom: 1.3rem; | ||
font-size: 1.3rem; | ||
} | ||
.content { | ||
.adrress { | ||
.state { | ||
font-size: 1rem; | ||
} | ||
.city { | ||
font-size: 1rem; | ||
} | ||
} | ||
.day { | ||
.created-at { | ||
font-size: 1rem; | ||
line-height: 1rem; | ||
} | ||
} | ||
} | ||
.price { | ||
font-size: 1.5rem; | ||
font-weight: bold; | ||
} | ||
} | ||
.sell-status { | ||
float: right; | ||
font-size: 1.5rem; | ||
} | ||
} | ||
} | ||
@media (max-width: 768px) { | ||
display: grid; | ||
grid-template-columns: 35rem; | ||
gap: 70px; | ||
.card { | ||
border-bottom: 1px solid var(--grey-box); | ||
.product-box { | ||
display: flex; | ||
flex-direction: row; | ||
img { | ||
margin-right: 3rem; | ||
width: 200px; | ||
} | ||
.title { | ||
margin-bottom: 1.3rem; | ||
font-size: 1.3rem; | ||
} | ||
.content { | ||
.adrress { | ||
.state { | ||
font-size: 1rem; | ||
} | ||
.city { | ||
font-size: 1rem; | ||
} | ||
} | ||
.day { | ||
.created-at { | ||
font-size: 1rem; | ||
line-height: 1rem; | ||
} | ||
} | ||
} | ||
.price { | ||
font-size: 1.5rem; | ||
font-weight: bold; | ||
} | ||
} | ||
.sell-status { | ||
float: right; | ||
font-size: 1.5rem; | ||
} | ||
} | ||
} | ||
/* @media (max-width: 1280px) { | ||
width: 62rem; | ||
} | ||
@media (max-width: 1024px) { | ||
width: 50rem; | ||
} | ||
@media (max-width: 768px) { | ||
width: 40rem; | ||
font-size: 0.88rem; | ||
} */ | ||
`; |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
db 데이터 만드신거는 백엔드 API 명세서 어떤걸 보고 만드신 건가요?