import React, { Component } from "react";
import { connect } from 'react-redux';
import { Redirect } from 'react-router-dom';
import { auth, register } from '../actions/auth';
import {SignUpForm} from '../components/auth/signUp';
import {SignInForm} from '../components/auth/signIn';
import Loader from '../components/loader';
class Auth extends Component {
state = { auth: true };
toggleAuth = () => this.setState(prevState => ({ auth: !prevState.auth}));
render() {
const { auth } = this.state;
const { user } = this.props
if(user)
{if(Object.keys(user).length !== 0 && !user.role && !user.doctor) {
return
У вас есть акаунт ? {" "} Зарегистрироваться
) : (У меня есть акаунт{" "} Войти
)}