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
b11c4c5d
Commit
b11c4c5d
authored
Feb 01, 2021
by
baesangjune
Browse files
요거로 하면 될 듯 해
parent
754acc13
Changes
4
Expand all
Hide whitespace changes
Inline
Side-by-side
client/.eslintcache
View file @
b11c4c5d
This diff is collapsed.
Click to expand it.
client/src/Components/Login.js
View file @
b11c4c5d
...
...
@@ -46,7 +46,7 @@ function Login() {
}
if
(
success
)
{
console
.
log
(
'
success
'
,
success
)
alert
(
"
로그인되었습니다.
"
)
return
<
Redirect
to
=
'
/
'
/>
//성공하면 홈화면으로 간다
}
...
...
client/src/Pages/Place.js
View file @
b11c4c5d
import
axios
from
'
axios
'
;
import
React
,
{
useEffect
,
useState
}
from
'
react
'
;
import
{
Container
,
Row
,
Button
,
}
from
'
react-bootstrap
'
;
import
{
Container
,
Row
,
Image
}
from
'
react-bootstrap
'
;
import
queryString
from
'
query-string
'
import
{
Link
}
from
'
react-router-dom
'
;
import
ohuh
from
'
../ohuh-sm.PNG
'
;
function
Place
(
props
)
{
console
.
log
(
props
)
...
...
@@ -53,6 +55,9 @@ function Place(props) {
return
(
<
Container
{...
props
}
>
<
Link
to
=
"
/
"
className
=
"
d-flex justify-content-center
"
>
<
Image
style
=
{{
margin
:
"
1%
"
}}
src
=
{
ohuh
}
/
>
<
/Link
>
{
place
}
{
Array
.
isArray
(
reviews
)
?
reviews
.
map
((
review
,
index
)
=>
{
return
(
...
...
client/src/utils/auth.js
View file @
b11c4c5d
...
...
@@ -5,6 +5,7 @@ export function handleLogin(userId) { //로그인할때 로컬스토리지에
}
export
async
function
handleLogout
()
{
alert
(
"
로그아웃되었습니다.
"
)
localStorage
.
removeItem
(
'
loginStatus
'
)
//로컬스토리지에서 로그인상태를 지운다
await
axios
.
get
(
'
/api/auth/logout
'
)
window
.
location
.
href
=
'
/
'
//경로 지정
...
...
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