Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
students
shopping-mall
Commits
0208334c
Commit
0208334c
authored
Jan 27, 2021
by
박상호
🎼
Browse files
good
parent
47a01da8
Changes
5
Show whitespace changes
Inline
Side-by-side
client/src/Components/MainNav.js
View file @
0208334c
...
@@ -16,10 +16,15 @@ function MainNav() {
...
@@ -16,10 +16,15 @@ function MainNav() {
{
user
?
{
user
?
<>
<>
<
Nav
.
Link
className
=
"
text-light
"
onClick
=
{()
=>
handleLogout
()}
>
Logout
<
/Nav.Link
>
<
Nav
.
Link
className
=
"
text-light
"
onClick
=
{()
=>
handleLogout
()}
>
Logout
<
/Nav.Link
>
<
Nav
.
Link
className
=
"
text-light
"
href
=
"
/account
"
>
Mypage
<
/Nav.Link
>
{
/* <Nav.Link className="text-light" href="/account"> Mypage </Nav.Link> */
}
{
admin
?
''
:
(
<
Nav
.
Link
className
=
"
text-light
"
href
=
"
/account
"
>
Mypage
<
/Nav.Link>
,
<
Nav
.
Link
href
=
"
/shoppingcart
"
>
<
Nav
.
Link
href
=
"
/shoppingcart
"
>
<
img
alt
=
"
카트
"
src
=
"
/icon/cart.svg
"
width
=
"
30
"
height
=
"
30
"
/>
<
img
alt
=
"
카트
"
src
=
"
/icon/cart.svg
"
width
=
"
30
"
height
=
"
30
"
/>
<
/Nav.Link
>
<
/Nav.Link
>
)}
<
/
>
<
/
>
:
(
:
(
<>
<>
...
...
client/src/Components/OrderCard.js
View file @
0208334c
...
@@ -19,25 +19,29 @@ function OrderCard(props) {
...
@@ -19,25 +19,29 @@ function OrderCard(props) {
<
Card
.
Header
className
=
"
font-weight-bold mb-3 text-center
"
style
=
{{
background
:
'
#F7F3F3
'
}}
>
<
Card
.
Header
className
=
"
font-weight-bold mb-3 text-center
"
style
=
{{
background
:
'
#F7F3F3
'
}}
>
{
e
.
products
[
0
].
productId
.
pro_name
}
{
e
.
products
[
0
].
productId
.
pro_name
}
<
/Card.Header>
)
}
<
/Card.Header>
)
}
<
Card
.
Text
>
<
Col
>
<
Col
>
<
Row
>
<
Row
className
=
''
>
<
Card
.
Text
>
주문번호
:
<
strong
>
{
e
.
_id
}
<
/strong> </
Card
.
Text
>
<
Col
sm
=
{
4
}
xs
=
{
4
}
className
=
'
p-1
'
>
주문번호
:
<
/Col
>
<
/Row
>
<
Col
sm
=
{
8
}
xs
=
{
8
}
className
=
'
p-1
'
><
strong
>
{
e
.
_id
}
<
/strong></
Col
>
<
Row
>
<
Card
.
Text
>
결제금액
:
<
strong
>
{
e
.
total
}
원
<
/strong> </
Card
.
Text
>
<
Col
sm
=
{
4
}
xs
=
{
4
}
className
=
'
p-1
'
>
결제금액
:
<
/Col
>
<
/Row
>
<
Col
sm
=
{
8
}
xs
=
{
8
}
className
=
'
p-1
'
><
strong
>
{
e
.
total
}
원
<
/strong></
Col
>
<
Row
>
<
Card
.
Text
>
배송지
:
<
strong
>
{
e
.
receiverInfo
.
address
}
-
{
e
.
receiverInfo
.
address2
}
<
/strong> </
Card
.
Text
>
<
Col
sm
=
{
4
}
xs
=
{
4
}
className
=
'
p-1
'
>
배송지
:
<
/Col
>
<
/Row
>
<
Col
sm
=
{
8
}
xs
=
{
8
}
className
=
'
p-1
'
><
strong
>
{
e
.
receiverInfo
.
address
}
/ </
strong
><
strong
><
small
>
{
e
.
receiverInfo
.
address2
}
<
/small></
strong
><
/Col
>
<
Row
>
<
Card
.
Text
>
주문날짜
:
<
strong
>
{
e
.
createdAt
.
substring
(
0
,
10
)}
<
/strong> </
Card
.
Text
>
<
Col
sm
=
{
4
}
xs
=
{
4
}
className
=
'
p-1
'
>
주문날짜
:
<
/Col
>
<
Col
sm
=
{
8
}
xs
=
{
8
}
className
=
'
p-1
'
><
strong
>
{
e
.
createdAt
.
substring
(
0
,
10
)}
<
/strong></
Col
>
<
/Row
>
<
/Row
>
<
/Col
>
<
/Col
>
<
/Card.Text
>
<
/Card.Body
>
<
/Card.Body
>
)
)
)
)
}
}
<
/Card
>
<
/Card
>
)
)
}
}
...
...
client/src/Pages/Account.js
View file @
0208334c
...
@@ -180,9 +180,9 @@ function Account() {
...
@@ -180,9 +180,9 @@ function Account() {
<
/Col
>
<
/Col
>
<
/Row
>
<
/Row
>
<
/Card
>
<
/Card
>
<
Card
>
<
div
className
=
'
m-2 mb-5
'
>
<
OrderCard
ordered
=
{
ordered
}
/
>
<
OrderCard
ordered
=
{
ordered
}
/
>
<
/
Card
>
<
/
div>
<
/Container
>
<
/Container
>
)
)
}
}
...
...
client/src/Pages/Product.js
View file @
0208334c
...
@@ -18,7 +18,7 @@ function Product({ match, location }) {
...
@@ -18,7 +18,7 @@ function Product({ match, location }) {
let
history
=
useHistory
();
let
history
=
useHistory
();
const
handleClose
=
()
=>
setShow
(
false
);
const
handleClose
=
()
=>
setShow
(
false
);
const
handleShow
=
()
=>
setShow
(
true
);
const
handleShow
=
()
=>
setShow
(
true
);
const
replace
=
product
.
description
.
replaceAll
(
'
{
\n\n
}
'
,
'
<br />
'
)
useEffect
(()
=>
{
useEffect
(()
=>
{
if
(
size
&&
color
)
{
if
(
size
&&
color
)
{
...
@@ -228,7 +228,7 @@ function Product({ match, location }) {
...
@@ -228,7 +228,7 @@ function Product({ match, location }) {
<
h5
className
=
'
m-0
'
style
=
{{
whiteSpace
:
'
nowrap
'
}}
>
[
Description
]
<
/h5
>
<
h5
className
=
'
m-0
'
style
=
{{
whiteSpace
:
'
nowrap
'
}}
>
[
Description
]
<
/h5
>
<
/Card.Header
>
<
/Card.Header
>
<
Card
.
Body
className
=
'
text-center m-2
'
style
=
{{
whiteSpace
:
"
pre-line
"
,
background
:
'
#F7F3F3
'
,
fontSize
:
'
1vw
'
}}
>
<
Card
.
Body
className
=
'
text-center m-2
'
style
=
{{
whiteSpace
:
"
pre-line
"
,
background
:
'
#F7F3F3
'
,
fontSize
:
'
1vw
'
}}
>
<
small
>
{
replace
}
<
/small
>
<
small
>
{
product
.
description
}
<
/small
>
<
/Card.Body
>
<
/Card.Body
>
<
/Card
>
<
/Card
>
<
Col
className
=
'
p-5
'
>
<
Col
className
=
'
p-5
'
>
...
...
client/src/Pages/ProductsList.js
View file @
0208334c
...
@@ -194,7 +194,7 @@ function ProductsList({ match }) {
...
@@ -194,7 +194,7 @@ function ProductsList({ match }) {
<
div
className
=
"
text-center
"
>
<
div
className
=
"
text-center
"
>
<
h1
style
=
{{
fontSize
:
"
5.5vmax
"
}}
className
=
"
text-center m-1 py-3
"
>
{
mainCategory
}
<
/h1
>
<
h1
style
=
{{
fontSize
:
"
5.5vmax
"
}}
className
=
"
text-center m-1 py-3
"
>
{
mainCategory
}
<
/h1
>
<
ButtonGroup
className
=
"
mb-3
"
style
=
{{
display
:
"
inline
"
}}
>
<
ButtonGroup
className
=
"
mb-3
"
style
=
{{
display
:
"
inline
"
}}
>
{
subCategory
.
map
(
el
=>
(
<
Button
className
=
"
m-1
"
style
=
{{
fontSize
:
"
0.8
vw
"
}}
name
=
{
el
}
onClick
=
{
handleSubname
}
>
{
el
}
<
/Button>
))
}
{
subCategory
.
map
(
el
=>
(
<
Button
className
=
"
m-1
"
style
=
{{
fontSize
:
"
1.2
vw
"
}}
name
=
{
el
}
onClick
=
{
handleSubname
}
>
{
el
}
<
/Button>
))
}
<
/ButtonGroup
>
<
/ButtonGroup
>
<
/div
>
<
/div
>
<
/Col
>
<
/Col
>
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment