From b682d93e92bf6a8a5f8a0d7175eee950ff6bf790 Mon Sep 17 00:00:00 2001 From: "Rayyan (Rayy)" Date: Tue, 19 Sep 2023 10:50:06 +0000 Subject: [PATCH] Add AuthContext to signup.js --- src/pages/Signup.js | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/pages/Signup.js b/src/pages/Signup.js index 6c3d0cb..744eb68 100644 --- a/src/pages/Signup.js +++ b/src/pages/Signup.js @@ -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('') @@ -12,6 +13,8 @@ export function Signup ( props ) { const[validemail,setValidemail] = useState(false) const[userpassword,setUserpassword] = useState('') const[validpassword,setValidpassword] = useState(false) + + const auth = useContext(AuthContext) const submitHandler = (evt) => { evt.preventDefault()