{"size": 1375, "ext": "js", "max_stars_repo_path": "src/modals/login-modal.js", "max_stars_repo_name": "afrilabs-capacity/portal", "max_stars_repo_stars_event_min_datetime": null, "max_stars_repo_stars_event_max_datetime": null, "max_issues_repo_path": "src/modals/login-modal.js", "max_issues_repo_name": "afrilabs-capacity/portal", "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "src/modals/login-modal.js", "max_forks_repo_name": "afrilabs-capacity/portal", "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_forks_event_max_datetime": null}
{"max_stars_count": null, "max_issues_count": null, "max_forks_count": null, "avg_line_length": 21.8253968254, "max_line_length": 83, "alphanum_fraction": 0.544}
import React,{useContext,useEffect,useState} from "react"
import {
    CModal,
    CModalHeader,
    CButton,
    CModalBody,
    CModalFooter,
    CRow,
    CCol,
    CProgress
  } from '@coreui/react'
  import axios from "axios";
  import FormikLoginContainer from '../formik-wrappers/FormikLoginContainer'
  import AuthProvider from '../context/AuthContext'


const LoginModal=({context})=>{

    const {authModal,setAuthModal,apiAction,setApiAction}=useContext(context)

     //alert(modal)

    return (
        <>
      
      <CModal
      size="sm"
        show={authModal}
        onClose={()=>{
          setAuthModal(!authModal) 
          setApiAction(false)
          } }
      >
        <CModalHeader closeButton><h1>Login</h1> </CModalHeader>
        <CModalBody>
          <CRow>
              <CCol md="12" className="text-center">
           <p style={{color:"red"}}>Session expired, please sign in to continue</p>
             <FormikLoginContainer context={context} />
              </CCol>
          </CRow>
         
        </CModalBody>
        <CModalFooter>
        
          <CButton
            color="secondary"
            onClick={()=>{
          setAuthModal(!authModal) 
          setApiAction(false)
          }}
          >Cancel</CButton>
        </CModalFooter>
      </CModal>
    </>
           
      )

}



export default LoginModal