You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
the code is shown below, I believe the error is occuring because I'm using react router v6
how do I write this code in react router v6
import React, {useState, useEffect} from 'react'
import { Link } from 'react-router-dom'
import { Form, Button, Row, Col } from 'react-bootstrap'
import { useDispatch, useSelector } from 'react-redux'
import Loader from '../components/Loader'
import Message from '../components/Message'
import FormContainer from '../components/FormContainer'
import { login } from '../actions/userActions'
function Loginpage({ Location, history }) {
const [email, setEmail] = useState('')
const [password, setPassword] = useState('')
Its about react-router-dom v6, you can't use location.search, import useSearchParamas in react-router-dom, but i didnt find yet how to use it, if you have error in LoginScreen, you need to have error with CartScreen, because it use same method
the code is shown below, I believe the error is occuring because I'm using react router v6
how do I write this code in react router v6
import React, {useState, useEffect} from 'react'
import { Link } from 'react-router-dom'
import { Form, Button, Row, Col } from 'react-bootstrap'
import { useDispatch, useSelector } from 'react-redux'
import Loader from '../components/Loader'
import Message from '../components/Message'
import FormContainer from '../components/FormContainer'
import { login } from '../actions/userActions'
function Loginpage({ Location, history }) {
const [email, setEmail] = useState('')
const [password, setPassword] = useState('')
return (
Sign In
{error &&{error}}
{loading && }
)
}
export default Loginpage
The text was updated successfully, but these errors were encountered: