Commit 6eb0e6a7 authored by seoyeon's avatar seoyeon
Browse files

12

parent fa6f60ff
...@@ -14,6 +14,7 @@ const RoomSingle = () => { ...@@ -14,6 +14,7 @@ const RoomSingle = () => {
const [room, setRoom] = useState(INIT_ROOM) const [room, setRoom] = useState(INIT_ROOM)
const [error,setError]=useState('') const [error,setError]=useState('')
const channelId = 1 const channelId = 1
const roomId = "1234567abc"
async function getJoinRoom(Id) { async function getJoinRoom(Id) {
try { try {
......
import axios from 'axios'
import { useEffect, useState } from 'react' import { useEffect, useState } from 'react'
import { Link } from 'react-router-dom' import { Link, Redirect } from 'react-router-dom'
import userApi from '../apis/user.api' import userApi from '../apis/user.api'
import catchErrors from '../context/catchError' import catchErrors from '../context/catchError'
...@@ -52,12 +53,15 @@ const Signup = () => { ...@@ -52,12 +53,15 @@ const Signup = () => {
alert('비밀번호가 일치하지 않습니다.') alert('비밀번호가 일치하지 않습니다.')
return false return false
} else { } else {
alert('회원가입 되었습니다.')
window.location.href = '/'
return true return true
} }
} }
if(success) {
alert('회원가입 되었습니다.')
window.location.href = '/'
}
const { name, id, password, checkpw, phone } = user const { name, id, password, checkpw, phone } = user
return ( return (
<div className="container"> <div className="container">
...@@ -132,6 +136,7 @@ const Signup = () => { ...@@ -132,6 +136,7 @@ const Signup = () => {
onChange={handleChange} onChange={handleChange}
/> />
</div> </div>
{/* {console.log(disabled)} */}
<div className="mt-3 d-flex justify-content-center"> <div className="mt-3 d-flex justify-content-center">
<button <button
type="submit" type="submit"
......
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