-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
Feature/search/#24
- Loading branch information
Showing
8 changed files
with
154 additions
and
125 deletions.
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
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 |
---|---|---|
@@ -1,51 +1,59 @@ | ||
import { Component } from 'react'; | ||
import './ProductInformation.css'; | ||
import { Component } from "react"; | ||
import "./ProductInformation.css"; | ||
|
||
class ProductInformation extends Component { | ||
render() { | ||
return ( | ||
<div class="content"> | ||
{/* 제품 설명 부분 */} | ||
<div class="product"> | ||
{/* 사진 부분 */} | ||
<div class="product_pic"> | ||
<img src="images/restmb_allidxmake.jpeg" width="300px" height="300px" alt="Product Image"></img> | ||
</div> | ||
{/*설명 부분*/} | ||
<div class="product_info"> | ||
<div> | ||
<h2>{this.props.product.name}</h2> | ||
{/*별점: https://melthleeth.tistory.com/entry/HTML-CSS%EB%A1%9C-%EB%B3%84%EC%B0%8D%EA%B8%B0-Star-Rating*/} | ||
<div class="star-ratings"> | ||
<div class="star-ratings-fill space-x-2 text-lg" | ||
style={{width: this.props.product.star}}> | ||
<span>★</span><span>★</span><span>★</span><span>★</span><span>★</span> | ||
</div> | ||
<div class="star-ratings-base space-x-2 text-lg"> | ||
<span>★</span><span>★</span><span>★</span><span>★</span><span>★</span> | ||
</div> | ||
</div> | ||
|
||
<p> | ||
{this.props.product.info} | ||
</p> | ||
<p> | ||
{this.props.product.info2} | ||
</p> | ||
<div class="hash_info"> | ||
<div class="hash_box">{this.props.product.hash1}</div> | ||
<div class="hash_box">{this.props.product.hash2}</div> | ||
</div> | ||
|
||
</div> | ||
|
||
</div> | ||
render() { | ||
return ( | ||
<div class="content"> | ||
{/* 제품 설명 부분 */} | ||
<div class="product"> | ||
{/* 사진 부분 */} | ||
<div class="product_pic"> | ||
<img | ||
src={this.props.product.imageUrl} | ||
width="300px" | ||
height="300px" | ||
alt="Product Image" | ||
></img> | ||
</div> | ||
{/*설명 부분*/} | ||
<div class="product_info"> | ||
<div> | ||
<h2>{this.props.product.productname}</h2> | ||
{/*별점: https://melthleeth.tistory.com/entry/HTML-CSS%EB%A1%9C-%EB%B3%84%EC%B0%8D%EA%B8%B0-Star-Rating*/} | ||
<div class="star-ratings"> | ||
<div | ||
class="star-ratings-fill space-x-2 text-lg" | ||
style={{ width: this.props.product.star * 12 }} | ||
> | ||
<span>★</span> | ||
<span>★</span> | ||
<span>★</span> | ||
<span>★</span> | ||
<span>★</span> | ||
</div> | ||
<div class="star-ratings-base space-x-2 text-lg"> | ||
<span>★</span> | ||
<span>★</span> | ||
<span>★</span> | ||
<span>★</span> | ||
<span>★</span> | ||
</div> | ||
</div> | ||
|
||
<p>{this.props.product.info}</p> | ||
<p>{this.props.product.info2}</p> | ||
<div class="hash_info"> | ||
<div class="hash_box">{this.props.product.hash1}</div> | ||
<div class="hash_box">{this.props.product.hash2}</div> | ||
<div class="hash_box">{this.props.product.hash3}</div> | ||
</div> | ||
</div> | ||
</div> | ||
</div> | ||
|
||
|
||
) | ||
} | ||
</div> | ||
); | ||
} | ||
} | ||
|
||
export default ProductInformation; | ||
export default ProductInformation; |
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 |
---|---|---|
@@ -1,14 +1,14 @@ | ||
const sex = [ | ||
const gender = [ | ||
{ _id: 0, name: "남성" }, | ||
{ _id: 1, name: "여성" }, | ||
]; | ||
|
||
const ages = [ | ||
const age = [ | ||
{ _id: 0, name: "10대" }, | ||
{ _id: 1, name: "20대" }, | ||
{ _id: 2, name: "30대" }, | ||
{ _id: 3, name: "40대" }, | ||
{ _id: 4, name: "50대" }, | ||
]; | ||
|
||
export { sex, ages }; | ||
export { gender, age }; |
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 |
---|---|---|
@@ -1,26 +1,22 @@ | ||
import ProductInformation from '../components/product/ProductInformation'; | ||
import ProductRecommend from '../components/product/ProductRecommend'; | ||
import { Component } from 'react'; | ||
import Data from '../kyungmin.json' | ||
|
||
class Product extends Component { | ||
import ProductInformation from "../components/product/ProductInformation"; | ||
import ProductRecommend from "../components/product/ProductRecommend"; | ||
import { Component } from "react"; | ||
import Data from "../kyungmin.json"; | ||
|
||
class Product extends Component { | ||
render() { | ||
return ( | ||
<div className="Product"> | ||
<ProductInformation | ||
product={Data.products[0]}> | ||
</ProductInformation> | ||
<ProductRecommend | ||
<ProductInformation product={Data.products[0]}></ProductInformation> | ||
<ProductRecommend | ||
recommendProduct1={Data.products[1]} | ||
recommendProduct2={Data.products[2]} | ||
recommendProduct3={Data.products[3]} | ||
recommendProduct4={Data.products[4]}> | ||
</ProductRecommend> | ||
recommendProduct4={Data.products[4]} | ||
></ProductRecommend> | ||
</div> | ||
); | ||
} | ||
} | ||
|
||
export default Product; | ||
|
Oops, something went wrong.