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
search-page
Commits
20a12a94
Commit
20a12a94
authored
Feb 01, 2021
by
Lee SeoYeon
Browse files
.
parent
c3d80753
Changes
5
Expand all
Show whitespace changes
Inline
Side-by-side
client/.eslintcache
View file @
20a12a94
This diff is collapsed.
Click to expand it.
client/src/Components/Paginations.js
View file @
20a12a94
...
@@ -8,7 +8,7 @@ function Paginations(props) {
...
@@ -8,7 +8,7 @@ function Paginations(props) {
return
(
return
(
<>
<>
{(
props
.
endPage
>
5
)
?
{(
props
.
endPage
>
5
)
?
<
Pagination
>
<
Pagination
>
<
Pagination
.
First
onClick
=
{()
=>
props
.
handlePage
(
1
)}
/
>
<
Pagination
.
First
onClick
=
{()
=>
props
.
handlePage
(
1
)}
/
>
{
props
.
index
===
1
?
<
Pagination
.
Prev
onClick
=
{()
=>
props
.
handlePage
(
props
.
index
)}
/> : <Pagination.Prev onClick={
()
=> props.handlePage
(
props.index - 1
)
} /
>
}
{
props
.
index
===
1
?
<
Pagination
.
Prev
onClick
=
{()
=>
props
.
handlePage
(
props
.
index
)}
/> : <Pagination.Prev onClick={
()
=> props.handlePage
(
props.index - 1
)
} /
>
}
{
props
.
index
===
props
.
endPage
-
1
?
<
Pagination
.
Item
onClick
=
{()
=>
props
.
handlePage
(
props
.
index
-
3
)}
>
{
props
.
index
-
3
}
<
/Pagination.Item> : ""
}
{
props
.
index
===
props
.
endPage
-
1
?
<
Pagination
.
Item
onClick
=
{()
=>
props
.
handlePage
(
props
.
index
-
3
)}
>
{
props
.
index
-
3
}
<
/Pagination.Item> : ""
}
...
...
client/src/Pages/App.js
View file @
20a12a94
import
React
,
{
useState
,
useEffect
}
from
'
react
'
;
import
React
,
{
useState
,
useEffect
}
from
'
react
'
;
import
{
Redirect
}
from
'
react-router-dom
'
;
import
{
Redirect
}
from
'
react-router-dom
'
;
import
ohuh
from
'
../ohuh.PNG
'
;
import
ohuh
from
'
../ohuh.PNG
'
;
import
{
Container
,
Row
,
Form
,
Image
,
InputGroup
,
Button
,
Col
,
Card
}
from
'
react-bootstrap
'
;
import
{
Container
,
Row
,
Form
,
Image
,
InputGroup
,
Button
,
Col
,
Card
,
Nav
}
from
'
react-bootstrap
'
;
import
axios
from
'
axios
'
;
import
axios
from
'
axios
'
;
import
Place
from
'
../Pages/Place.js
'
;
import
Place
from
'
../Pages/Place.js
'
;
import
{
handleLogout
,
isAuthenticated
}
from
'
../utils/auth.js
'
function
App
()
{
function
App
()
{
const
[
state
,
setState
]
=
useState
(
false
);
const
[
state
,
setState
]
=
useState
(
false
);
...
@@ -11,7 +12,7 @@ function App() {
...
@@ -11,7 +12,7 @@ function App() {
const
[
show
,
setShow
]
=
useState
(
false
);
const
[
show
,
setShow
]
=
useState
(
false
);
const
[
recommend
,
setRecommend
]
=
useState
([{
name
:
"
"
,
address
:
"
"
,
img
:
"
"
}]);
const
[
recommend
,
setRecommend
]
=
useState
([{
name
:
"
"
,
address
:
"
"
,
img
:
"
"
}]);
const
[
latest
,
setLatest
]
=
useState
([{
name
:
"
"
,
address
:
"
"
,
img
:
"
"
}]);
const
[
latest
,
setLatest
]
=
useState
([{
name
:
"
"
,
address
:
"
"
,
img
:
"
"
}]);
const
user
=
isAuthenticated
()
useEffect
(()
=>
{
useEffect
(()
=>
{
getRecommend
()
getRecommend
()
...
@@ -54,8 +55,18 @@ function App() {
...
@@ -54,8 +55,18 @@ function App() {
return
(
return
(
<
Container
className
=
"
vh-100
"
>
<
Container
className
=
"
vh-100
d-flex justify-content-md-center
\
"
>
<Col md={12} >
<Col md={12} >
<Nav className=
"
justify
-
content
-
end
"
bg=
"
#
fff
"
variant=
"
light
"
>
{user ? <Nav.Link onClick={() => handleLogout()}>로그아웃</Nav.Link>
: (
<>
<Nav.Link href=
"
/
signup
"
>회원가입</Nav.Link>
<Nav.Link href=
"
/
login
"
>로그인</Nav.Link>
</>
)}
<Nav.Link href='/bookmark'>북마크</Nav.Link>
</Nav>
<Row className=
"
justify
-
content
-
center
"
>
<Row className=
"
justify
-
content
-
center
"
>
<Image src={ohuh} style={{ margin:
"
5
%
"
, marginTop :
"
3
%
"
}} />
<Image src={ohuh} style={{ margin:
"
5
%
"
, marginTop :
"
3
%
"
}} />
</Row>
</Row>
...
@@ -84,7 +95,7 @@ function App() {
...
@@ -84,7 +95,7 @@ function App() {
<Card.Body >
<Card.Body >
<Card.Text style={{ overflow: 'auto', fontSize: '25px', width: '100%', height:
"
80
px
"
}} >
<Card.Text style={{ overflow: 'auto', fontSize: '25px', width: '100%', height:
"
80
px
"
}} >
{recommend.address} </Card.Text>
{recommend.address} </Card.Text>
<
Button
variant
=
"
primary
"
onClick
=
{()
=>
{
<Button variant=
"
info
"
onClick={() => {
setShow(true)
setShow(true)
}}>{recommend.name} 자세히 살펴보기</Button>
}}>{recommend.name} 자세히 살펴보기</Button>
<Place place={recommend} show={show} onHide={() => setShow(false)} />
<Place place={recommend} show={show} onHide={() => setShow(false)} />
...
@@ -100,7 +111,7 @@ function App() {
...
@@ -100,7 +111,7 @@ function App() {
<Card.Body >
<Card.Body >
<Card.Text style={{ overflow: 'auto', fontSize: '25px', width: '100%', height:
"
80
px
"
}} >
<Card.Text style={{ overflow: 'auto', fontSize: '25px', width: '100%', height:
"
80
px
"
}} >
{latest.address} </Card.Text>
{latest.address} </Card.Text>
<
Button
variant
=
"
primary
"
onClick
=
{()
=>
{
<Button variant=
"
info
"
onClick={() => {
setShow(true)
setShow(true)
}}>{latest.name} 자세히 살펴보기</Button>
}}>{latest.name} 자세히 살펴보기</Button>
<Place place={latest} show={show} onHide={() => setShow(false)} />
<Place place={latest} show={show} onHide={() => setShow(false)} />
...
...
client/src/Pages/Place.js
View file @
20a12a94
...
@@ -8,7 +8,7 @@ function Place(props) {
...
@@ -8,7 +8,7 @@ function Place(props) {
const
[
db
,
setDb
]
=
useState
(
false
)
const
[
db
,
setDb
]
=
useState
(
false
)
const
[
index
,
setIndex
]
=
useState
(
0
)
const
[
index
,
setIndex
]
=
useState
(
0
)
const
[
reviews
,
setReviews
]
=
useState
([])
const
[
reviews
,
setReviews
]
=
useState
([])
const
place
=
queryString
.
parse
(
props
.
location
.
search
).
place
const
place
=
queryString
.
parse
(
props
.
location
).
place
const
getReview
=
(
index
)
=>
{
const
getReview
=
(
index
)
=>
{
console
.
log
(
index
,
"
dlseprtm
"
)
console
.
log
(
index
,
"
dlseprtm
"
)
...
...
client/src/Pages/Search.js
View file @
20a12a94
...
@@ -162,7 +162,7 @@ function Search(props) {
...
@@ -162,7 +162,7 @@ function Search(props) {
return
(
return
(
<
Container
>
<
Container
>
<
Link
to
=
"
/
path
"
className
=
"
d-flex justify-content-center
"
><
Image
src
=
{
ohuh
}
/></
Link
>
<
Link
to
=
"
/
"
className
=
"
d-flex justify-content-center
"
><
Image
src
=
{
ohuh
}
/></
Link
>
<
Row
className
=
"
mb-2
"
className
=
"
d-flex justify-content-center
"
>
<
Row
className
=
"
mb-2
"
className
=
"
d-flex justify-content-center
"
>
<
Form
style
=
{{
width
:
"
90vw
"
}}
onSubmit
=
{
handleSubmit
}
>
<
Form
style
=
{{
width
:
"
90vw
"
}}
onSubmit
=
{
handleSubmit
}
>
<
InputGroup
size
=
"
lg
"
>
<
InputGroup
size
=
"
lg
"
>
...
@@ -201,7 +201,7 @@ function Search(props) {
...
@@ -201,7 +201,7 @@ function Search(props) {
<
Card
.
Text
style
=
{{
overflow
:
'
auto
'
,
fontSize
:
'
25px
'
,
width
:
'
100%
'
,
height
:
"
80px
"
}}
>
<
Card
.
Text
style
=
{{
overflow
:
'
auto
'
,
fontSize
:
'
25px
'
,
width
:
'
100%
'
,
height
:
"
80px
"
}}
>
{
place
.
address
}
<
/Card.Text
>
{
place
.
address
}
<
/Card.Text
>
<
Link
to
=
{
`/place?id=
${
index
}
&place=
${
place
.
name
}
`
}
>
<
Link
to
=
{
`/place?id=
${
index
}
&place=
${
place
.
name
}
`
}
>
<
Button
variant
=
"
primary
"
>
{
place
.
name
}
자세히
살펴보기
<
/Button
>
<
Button
variant
=
"
info
"
>
{
place
.
name
}
자세히
살펴보기
<
/Button
>
<
/Link
>
<
/Link
>
<
/Card.Body
>
<
/Card.Body
>
<
/Card
>
<
/Card
>
...
...
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