Add AuthContext to signup.js
This commit is contained in:
parent
1f39645265
commit
b682d93e92
|
@ -2,8 +2,9 @@ import Form from 'react-bootstrap/Form';
|
|||
import Container from 'react-bootstrap/Container';
|
||||
import Row from 'react-bootstrap/Row';
|
||||
import Col from 'react-bootstrap/Col';
|
||||
import Button from "react-bootstrap/Button"
|
||||
import {useState, useEffect} from 'react';
|
||||
import Button from "react-bootstrap/Button";
|
||||
import {useState, useEffect, useContext} from 'react';
|
||||
import { AuthContext } from "../contexts/AuthContext";
|
||||
|
||||
export function Signup ( props ) {
|
||||
const[username,setUsername] = useState('')
|
||||
|
@ -13,6 +14,8 @@ export function Signup ( props ) {
|
|||
const[userpassword,setUserpassword] = useState('')
|
||||
const[validpassword,setValidpassword] = useState(false)
|
||||
|
||||
const auth = useContext(AuthContext)
|
||||
|
||||
const submitHandler = (evt) => {
|
||||
evt.preventDefault()
|
||||
props.handler( useremail, userpassword )
|
||||
|
|
Loading…
Reference in New Issue