import React, { useState } from 'react';
import { Button, Form, Container, Navbar } from 'react-bootstrap';
import { Link } from 'react-router-dom';
import Menu from '../Components/Menu';
function SingUp() {
const [validated, setValidated] = useState(false);
const handleSubmit = (event) => {
const form = event.currentTarget;
if (form.checkValidity() === false) {
event.preventDefault();
event.stopPropagation();
}
setValidated(true);
};
// async function addUser(user) {
// await fetch(`http://localhost:3000/users`, {
// method: 'POST',
// headers: {
// 'Content-Type' : 'application/json'
// },
// body: JSON.stringify(user)
// //json 형식으로 보냄.
// })
// }
function submitUser() {
const username = document.querySelector('#username')
const nickname = document.querySelector('#nickname')
const email = document.querySelector('#email')
const password = document.querySelector('#password')
const user = {
username: username.value,
nickname: nickname.value,
email: email.value,
password: password.value
}
console.log(user);
}
return (
<>