Commit 8a09b651 authored by Lee SeoYeon's avatar Lee SeoYeon
Browse files

.

parent d0e82382
This diff is collapsed.
......@@ -21,7 +21,7 @@ function Login() {
useEffect(() => { //참거짓 판단 값들의 원소들이 element로 들어간다
const isUser = Object.values(user).every(el => Boolean(el))
isUser ? setDisabled(false) : setDisabled(true)
isUser ? setDisabled(false) : setDisabled(true)
}, [user])
function handleChange(event) {
......@@ -33,10 +33,10 @@ function Login() {
event.preventDefault() //리셋을 막는다
try {
setLoading(true)
setError('')
setError('') //값을 배열로 설정
const response = await axios.post('/api/auth/login', user)
console.log(response.data)
handleLogin(response.data.userId)
handleLogin(response.data.userId)//로그인했을때 userid data를 넣는다
setSuccess(true)
} catch (error) {
catchErrors(error, setError)
......
......@@ -11,7 +11,7 @@ import axios from "axios";
const INIT_PAGE = {
title: '',
url: '',
}
} //초기페이지에 타이틀이랑 url 저장
function Search(props) {
const endPage = 10;
......
......@@ -7,7 +7,7 @@ async function connectDb() {
if (connection.isConnected) {
return
}
//디비연결
const db = await mongoose.connect(config.mongoDbUri, {
useNewUrlParser: true,
useUnifiedTopology: true,
......
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