import React from "react"; import FloatingLabel from "react-bootstrap/FloatingLabel"; import Form from "react-bootstrap/Form"; import Button from "react-bootstrap/Button"; import Alert from "react-bootstrap/Alert"; import { useState, useEffect } from "react"; import { store } from "../reducers/index"; import { actionFullLogin } from "../actions"; import { Link } from "react-router-dom"; import { connect } from "react-redux"; import { compose } from "redux"; import { history } from "../App"; const Login = ({ onLogin, token }) => { const [login, setLogin] = useState(""); const [password, setPassword] = useState(""); const [check, setCheck] = useState(false) // useEffect(() => { // if(token?.token) { // } // }, [token]) return (

Login

{ setLogin(e.target.value); }} > { setPassword(e.target.value); }} >
Incorect Login or Password
Don't have an account? Register
); }; export const CLogin = connect((state) => ({token: state.auth}), { onLogin: actionFullLogin, })(Login);