Commit b11c4c5d authored by baesangjune's avatar baesangjune
Browse files

요거로 하면 될 듯 해

parent 754acc13
This diff is collapsed.
...@@ -46,7 +46,7 @@ function Login() { ...@@ -46,7 +46,7 @@ function Login() {
} }
if (success) { if (success) {
console.log('success', success) alert("로그인되었습니다.")
return <Redirect to= '/'/> //성공하면 홈화면으로 간다 return <Redirect to= '/'/> //성공하면 홈화면으로 간다
} }
......
import axios from 'axios'; import axios from 'axios';
import React, { useEffect, useState } from 'react'; 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 queryString from 'query-string'
import { Link } from 'react-router-dom';
import ohuh from '../ohuh-sm.PNG';
function Place(props) { function Place(props) {
console.log(props) console.log(props)
...@@ -53,6 +55,9 @@ function Place(props) { ...@@ -53,6 +55,9 @@ function Place(props) {
return ( return (
<Container {...props}> <Container {...props}>
<Link to="/" className="d-flex justify-content-center">
<Image style={{ margin: "1%" }} src={ohuh} />
</Link>
{place} {place}
{Array.isArray(reviews) ? reviews.map((review, index) => { {Array.isArray(reviews) ? reviews.map((review, index) => {
return ( return (
......
...@@ -5,6 +5,7 @@ export function handleLogin(userId) { //로그인할때 로컬스토리지에 ...@@ -5,6 +5,7 @@ export function handleLogin(userId) { //로그인할때 로컬스토리지에
} }
export async function handleLogout() { export async function handleLogout() {
alert("로그아웃되었습니다.")
localStorage.removeItem('loginStatus') //로컬스토리지에서 로그인상태를 지운다 localStorage.removeItem('loginStatus') //로컬스토리지에서 로그인상태를 지운다
await axios.get('/api/auth/logout') await axios.get('/api/auth/logout')
window.location.href='/' //경로 지정 window.location.href='/' //경로 지정
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment