{"version":3,"sources":["assets/images/medical2.svg","assets/images/logo2.png","pages/LandingPage.js","assets/images/choice.svg","assets/images/yoga.svg","components/RegisterForm.js","pages/Register.js","assets/images/security.svg","store/auth-context.js","pages/Login.js","components/Addfile.js","components/Record.js","components/RecordList.js","components/SideNav.js","components/DocCard.js","components/AddDoc.js","pages/Dashboard.js","App.js","index.js"],"names":["LandingPage","className","src","logo","to","illustration","RegisterForm","props","useState","name","setName","speciality","setSpeciality","age","setAge","gender","setGender","phone","setPhone","email","setEmail","pass","setPass","loading","setLoading","status","body","error","setError","history","useHistory","type","required","onChange","event","target","value","isPatient","id","selected","onClick","e","preventDefault","myHeaders","Headers","append","requestOptions","method","headers","JSON","stringify","redirect","fetch","then","response","data","json","push","result","console","log","firstkey","Object","keys","catch","replace","errors","yoga","Register","choose","setChoose","setIsPatient","choiceimg","AuthContext","React","createContext","token","isLoggedIn","login","logout","AuthContextProvider","initialToken","localStorage","getItem","initialEmail","setToken","contextValue","setItem","removeItem","Provider","children","Login","authCtx","useContext","raw","key","loginimg","Addfile","closeModal","onClose","isUploaded","setIsUploaded","file","setFile","filename","setFilename","files","length","fetchRecords","Record","filepath","record","substring","lastIndexOf","RecordList","records","map","href","SideNav","onAdd","setCurrentTab","currentTab","swal","text","icon","dangerMode","buttons","willlogout","DocCard","doc","AddDoc","docList","setDocList","inputID","setInputID","getDocList","useEffect","placeholder","doctor_name","title","doctor_speciality","buttonColor","giveAccess","showConfirmButton","confirmButtonColor","confirmButtonText","cancelButtonColor","Dashboard","profile","setProfile","addFile","setAddFile","setRecords","getRecords","exact","path","App","ReactDOM","render","StrictMode","document","getElementById"],"mappings":"+VAAe,G,kBAAA,IAA0B,sC,OCA1B,MAA0B,kC,OC6B1BA,EAxBI,WAGf,OACI,sBAAKC,UAAU,mBAAf,UACI,sBAAKA,UAAU,OAAf,UACI,sBAAKA,UAAU,SAAf,UACA,qBAAKC,IAAKC,IACV,oBAAIF,UAAU,QAAd,wBAGJ,mBAAGA,UAAU,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AWpB,GAE3B,OACE,cAAC,IAAD,UACE,eAAC,IAAD,WAEE,cAAC,IAAD,CAAOiF,OAAK,EAACC,KAAK,IAAlB,SACI/D,EAAQf,WACV,cAAC,IAAD,CAAUzE,GAAG,eACZ,cAAC,EAAD,MAEH,cAAC,IAAD,CAAOuJ,KAAK,YAAYD,OAAK,EAA7B,SACE,cAAC,EAAD,OAEA9D,EAAQf,YACV,cAAC,IAAD,CAAO8E,KAAK,SAASD,OAAK,EAA1B,SACE,cAAC,EAAD,MAED9D,EAAQf,YACT,cAAC,IAAD,CAAO8E,KAAK,aAAZ,SACE,cAAC,EAAD,MAEF,cAAC,IAAD,CAAOA,KAAK,IAAZ,SAEI/D,EAAQf,WAAW,cAAC,IAAD,CAAUzE,GAAG,MAAM,cAAC,IAAD,CAAUA,GAAG,mBC9B/DyJ,IAASC,OACP,cAAC,EAAD,UACE,cAAC,IAAMC,WAAP,UACE,cAAC,EAAD,QAGJC,SAASC,eAAe,W","file":"static/js/main.64da96d3.chunk.js","sourcesContent":["export default __webpack_public_path__ + \"static/media/medical2.3ff790aa.svg\";","export default __webpack_public_path__ + \"static/media/logo2.ffcb9476.png\";","import '../assets/css/Landing.css';\nimport illustration from \"../assets/images/medical2.svg\";\nimport {Redirect, Link} from 'react-router-dom';\nimport logo from \"../assets/images/logo2.png\";\n\nconst LandingPage =()=>{\n \n\n return(\n
\n
\n
\n \n

Shealth

\n
\n \n

Organise your medical history with ease

\n
\n \n \n
\n
\n
\n \n
\n
\n )\n}\n\nexport default LandingPage;","export default __webpack_public_path__ + \"static/media/choice.8f570701.svg\";","export default __webpack_public_path__ + \"static/media/yoga.a58f0441.svg\";","import { useState } from \"react\";\nimport \"../assets/css/Form.css\";\nimport yoga from \"../assets/images/yoga.svg\";\nimport \"../assets/css/loader.css\";\nimport { Redirect, useHistory } from \"react-router-dom\";\n\nconst RegisterForm=(props)=>\n{\n const [name, setName] = useState(\"\");\n const nameChangeHandler=(event)=>\n {\n setName(event.target.value);\n }\n\n const [speciality, setSpeciality] = useState(\"\");\n const specialityChangeHandler=(event)=>\n {\n setSpeciality(event.target.value);\n }\n\n const [age, setAge] = useState(\"\");\n const ageChangeHandler=(event)=>\n {\n setAge(event.target.value);\n }\n\n const [gender, setGender] = useState(\"\");\n const genderChangeHandler=(event)=>\n {\n setGender(event.target.value);\n }\n\n const [phone, setPhone] = useState(\"\");\n const phoneChangeHandler=(event)=>\n {\n setPhone(event.target.value);\n }\n\n const [email, setEmail] = useState(\"\");\n const emailChangeHandler=(event)=>\n {\n setEmail(event.target.value);\n }\n\n const [pass, setPass] = useState(\"\");\n const passChangeHandler=(event)=>\n {\n setPass(event.target.value);\n }\n\n const [loading, setLoading] = useState(false);\n const [error, setError] = useState({\n status: false,\n body: \"\"\n });\n const history=useHistory();\n\n\n const registerHandler=(e)=>{\n\n e.preventDefault();\n setLoading(true);\n\n var myHeaders = new Headers();\n myHeaders.append(\"Content-Type\", \"application/json\");\n\n if(!props.isPatient)\n {\n\n var raw = JSON.stringify({\n \"name\": name,\n \"email\": email,\n \"phone\": phone,\n \"speciality\": speciality,\n \"password\": pass\n });\n\n var requestOptions = {\n method: 'POST',\n headers: myHeaders,\n body: raw,\n redirect: 'follow'\n };\n\n fetch(\"https://shealthapi.servatom.com/register/d/\", requestOptions)\n .then(response => {\n const data= response.json();\n setLoading(false)\n\n if(response.status==200)\n history.replace(\"/login\")\n\n return data;\n })\n .then(result => {\n console.log(result)\n \n let firstkey = Object.keys(result.errors)[0];\n \n setError(\n {\n status: true,\n body: result.errors[firstkey]\n }\n )\n \n })\n .catch(error => \n {console.log('error', error);\n setLoading(false);\n setError(\n {\n status: true,\n body: \"An error occured :/\"\n }\n )\n });\n }\n else\n {\n\n var raw = JSON.stringify({\n \"name\": name,\n \"email\": email,\n \"phone\": phone,\n \"age\": age,\n \"sex\": gender,\n \"password\": pass\n });\n\n var requestOptions = {\n method: 'POST',\n headers: myHeaders,\n body: raw,\n redirect: 'follow'\n };\n\n fetch(\"https://shealthapi.servatom.com/register/p/\", requestOptions)\n .then(response => {\n const data= response.json();\n setLoading(false)\n\n if(response.status==200)\n history.push(\"/login\");\n\n return data;\n })\n .then(result => {\n console.log(result)\n \n let firstkey = Object.keys(result)[0];\n \n setError(\n {\n status: true,\n body: result[firstkey]\n }\n )\n \n })\n .catch(error => {console.log('error', error);\n setLoading(false);\n setError(\n {\n status: true,\n body: \"An error occured :/\"\n }\n )\n });\n }\n }\n\n return(\n
\n
\n
\n

Register

\n \n \n {\n props.isPatient?\n <>\n \n \n \n \n \n :<>\n \n \n \n }\n \n \n \n {/* \n \n \n \n \n */}\n \n \n \n \n {\n error.status?{error.body}:null\n }\n \n {\n loading?\n
\n :null\n }\n
\n \n
\n \n
\n )\n}\nexport default RegisterForm;","import { useState } from \"react\";\nimport { Redirect } from \"react-router-dom\";\nimport \"../assets/css/Form.css\";\nimport choiceimg from \"../assets/images/choice.svg\";\nimport RegisterForm from \"../components/RegisterForm\";\nconst Register=()=>{\n \n const [choose, setChoose] = useState(false);\n const [isPatient, setIsPatient] = useState(null);\n\n const selectDoctor=()=>\n {\n setChoose(true);\n setIsPatient(false);\n }\n const selectPatient=()=>\n {\n setChoose(true);\n setIsPatient(true);\n }\n \n return(\n\n <>\n {\n !choose?\n
\n

Register as:

\n
\n \n \n
\n \n
\n :\n \n }\n \n \n \n )\n}\nexport default Register;","export default __webpack_public_path__ + \"static/media/security.1221ee61.svg\";","import React, { useState } from 'react';\n\nconst AuthContext = React.createContext({\n token: '',\n email: '',\n isLoggedIn: false,\n login: (token)=>{},\n setEmail:(email)=>{},\n logout: ()=>{}\n});\n\nexport const AuthContextProvider = (props)=>\n{\n const initialToken = localStorage.getItem('token');\n const initialEmail = localStorage.getItem('userEmail');\n \n const [token, setToken] = useState(!!initialToken?initialToken:null);\n const [email, setEmail] = useState(!!initialEmail?initialEmail:null);\n\n const userIsLoggedIn = !!token;\n const loginHandler=(token)=>\n {\n setToken(token);\n localStorage.setItem('token',token);\n localStorage.setItem('userEmail',email);\n \n }\n const emailHandler=(email)=>\n {\n setEmail(email);\n\n }\n\n const logoutHandler=()=>\n {\n setToken(null);\n setEmail(null);\n localStorage.removeItem('token');\n localStorage.removeItem('userEmail');\n \n }\n \n\n const contextValue={\n token: token,\n email: email,\n isLoggedIn: userIsLoggedIn,\n login: loginHandler,\n setEmail: emailHandler,\n logout: logoutHandler\n }\n \n return \n {props.children}\n \n}\n\nexport default AuthContext;","import loginimg from \"../assets/images/security.svg\";\nimport { useContext, useState } from \"react\";\nimport \"../assets/css/loader.css\";\nimport AuthContext from \"../store/auth-context\";\nimport { Link, Redirect, useHistory } from \"react-router-dom\";\n\nconst Login =()=>\n{\n \n \n const authCtx = useContext(AuthContext);\n const history = useHistory();\n \n const [email, setEmail] = useState(\"\");\n const emailChangeHandler=(event)=>\n {\n setEmail(event.target.value);\n authCtx.setEmail(event.target.value);\n }\n\n const [pass, setPass] = useState(\"\");\n const passChangeHandler=(event)=>\n {\n setPass(event.target.value);\n }\n\n const [loading, setLoading] = useState(false);\n const [error, setError] = useState({\n status: false,\n body: \"\"\n });\n\n const loginHandler=(e)=>\n {\n e.preventDefault();\n setLoading(true);\n\n var myHeaders = new Headers();\n myHeaders.append(\"Content-Type\", \"application/json\");\n myHeaders.append(\"Cookie\", \"cf_ob_info=520:6862f273df140f00:BOM; cf_use_ob=443\");\n\n var raw = JSON.stringify({\n \"email\": email,\n \"password\": pass\n });\n\n var requestOptions = {\n method: 'POST',\n headers: myHeaders,\n body: raw,\n redirect: 'follow'\n };\n\n fetch(\"https://shealthapi.servatom.com/auth/login/\", requestOptions)\n .then(response => {\n \n const data= response.json();\n setLoading(false)\n\n return data;\n })\n .then(result => {\n \n \n console.log(result.key, email);\n authCtx.login(result.key);\n\n if(result.key)\n history.replace(\"/dashboard\");\n let firstkey = Object.keys(result)[0];\n\n setError(\n {\n status: true,\n body: result[firstkey]\n }\n )\n\n if(result.key)\n setError(\n {\n status: true,\n body: \"Loggin successful\"\n }\n )\n \n })\n .catch(error => \n {console.log('error', error);\n setLoading(false);\n \n });\n }\n \n return(\n
\n
\n
\n

Login

\n

New User? Register Here

\n {/* \n \n \n \n \n */}\n \n \n \n \n {\n error.status?{error.body}:null\n }\n \n {\n loading?\n
\n :null\n }\n
\n
\n \n
\n )\n}\nexport default Login;","import \"../assets/css/Addfile.css\"\nimport {GrClose} from 'react-icons/gr';\nimport { useState } from \"react\";\nconst Addfile=(props)=>\n{\n const closeModal=()=>\n {\n props.onClose(false);\n }\n\n \n const [token, setToken] = useState(props.token);\n\n const [isUploaded, setIsUploaded] = useState(false);\n const [file, setFile] = useState(null);\n\n const [filename, setFilename] = useState(\"\");\n\n const filenameChangeHandler=(e)=>{\n setFilename(e.target.value);\n }\n \n const fileChangeHandler=(e)=>{\n setFile(e.target.files[0]);\n console.log(e.target.files[0]);\n setIsUploaded(true)\n setFilename(e.target.files[0].name);\n }\n\n const [loading, setLoading] = useState(false);\n const [error, setError] = useState({\n status: false,\n body: \"\"\n });\n \n const fileUploadHandler=(e)=>\n {\n setLoading(true);\n e.preventDefault();\n if(!filename.length)\n {\n setError(\n {\n status: true,\n body: \"File name can't be empty\"\n }\n );\n return\n }\n\n var myHeaders = new Headers();\n myHeaders.append(\"Authorization\", \"Token \"+token);\n myHeaders.append(\"Content-Disposition\", \"multipart/form-data; filename=\"+filename);\n // myHeaders.append(\"Content-Type\", \"application/pdf\");\n\n\n var requestOptions = {\n method: 'POST',\n headers: myHeaders,\n body: file,\n redirect: 'follow'\n };\n\n fetch(\"https://shealthapi.servatom.com/patient/upload/\", requestOptions)\n .then(response => {\n \n const data= response.json();\n setLoading(false)\n \n props.fetchRecords();\n return data;\n })\n .then(result => {\n \n \n let firstkey = Object.keys(result)[0];\n\n setError(\n {\n status: true,\n body: result[firstkey]\n }\n )\n \n })\n .catch(error => \n {console.log('error', error);\n setLoading(false);\n \n });\n }\n \n return(\n <>\n
\n
\n \n
\n \n
\n
\n

Upload your file here

\n \n {\n isUploaded?\n <>\n \n \n \n \n :null\n }\n {\n loading?\n
\n :null\n }\n
\n
\n {\n error.status?{error.body}:null\n }\n
\n
\n \n )\n}\n\nexport default Addfile;","\nimport {GrDocumentPdf} from 'react-icons/gr';\nimport \"../assets/css/Records.css\";\n\nconst Record=(props)=>\n{\n let filepath = props.record.file;\n \n let filename = filepath.substring(filepath.lastIndexOf(\"/\") + 1, filepath.length);\n \n return(\n
\n \n

{filename}

\n
\n )\n}\n\nexport default Record;","import { useContext, useEffect, useState } from \"react\";\nimport { Link } from \"react-router-dom\";\nimport \"../assets/css/Records.css\";\nimport AuthContext from \"../store/auth-context\";\nimport Record from \"./Record\";\n\nconst RecordList=(props)=>\n{\n \n const authCtx = useContext(AuthContext);\n\n return(\n \n
\n {\n props.records.map((record)=>{\n return(\n \n \n \n )\n })\n }\n
\n \n );\n}\n\nexport default RecordList;","import \"../assets/css/Sidenav.css\";\nimport logo from \"../assets/images/logo2.png\";\nimport {GrDocumentText, GrUserManager, GrSettingsOption, GrAdd, GrLogout} from 'react-icons/gr';\nimport {IoMdStats} from 'react-icons/io';\nimport { useContext, useState } from \"react\";\nimport swal from 'sweetalert';\nimport AuthContext from \"../store/auth-context\";\nimport { Link, useHistory } from \"react-router-dom\";\n\n\nconst SideNav =(props)=>\n{ \n\n const authCtx = useContext(AuthContext);\n const history = useHistory();\n \n const logoutHandler=()=>\n {\n swal(\n {\n text:\"Are you sure you want to log out?\",\n icon:\"warning\",\n dangerMode:true,\n buttons: true,\n }\n )\n .then((willlogout)=>{\n if(willlogout)\n {\n authCtx.logout();\n history.replace(\"/\");\n \n }\n })\n }\n\n return(\n
\n
\n \n

Shealth

\n
\n \n

Add

\n\n \n

{\n props.setCurrentTab(1);\n history.push('/dashboard');\n }}\n className={props.currentTab === 1 ? 'active' : ''} >\n Prescriptions\n

\n \n \n \n

{\n props.setCurrentTab(2);\n history.push('/dashboard/reports');\n }}\n className={props.currentTab === 2 ? 'active' : ''} >\n Reports\n

\n \n\n \n

{\n props.setCurrentTab(3);\n history.push('/dashboard/add_Doc');\n }}\n className={props.currentTab === 3 ? 'active' : ''} >\n Doctors\n

\n \n\n \n

{\n props.setCurrentTab(4);\n history.push('/dashboard/settings');\n }}\n className={props.currentTab === 4 ? 'active' : ''} >\n Settings\n

\n \n

Logout

\n
\n {/* */}\n
\n \n
\n\n );\n}\n\nexport default SideNav;","import \"../assets/css/Card.css\";\n\nconst DocCard=(props)=>\n{\n return(\n
\n

{`Dr. ${props.doc.name}`}

\n

{props.doc.speciality}

\n

{props.doc.email}

\n

{props.doc.phone}

\n
\n )\n}\n\nexport default DocCard;","import { useContext, useEffect, useState } from \"react\";\nimport swal from \"sweetalert\";\nimport \"../assets/css/Form.css\"\nimport AuthContext from \"../store/auth-context\";\nimport DocCard from \"./DocCard\";\n\nconst AddDoc=()=>\n{\n\n const authCtx = useContext(AuthContext)\n \n const [docList, setDocList] = useState([]);\n const [inputID, setInputID] = useState('');\n const inputChangeHandler =(e)=>\n {\n setInputID(e.target.value)\n }\n \n const addDoctorHandler=(e)=>\n {\n e.preventDefault();\n var myHeaders = new Headers();\n myHeaders.append(\"Content-Type\", \"application/json\");\n\n var raw = JSON.stringify({\n \"doc_id\": inputID\n });\n\n var requestOptions = {\n method: 'POST',\n headers: myHeaders,\n body: raw,\n redirect: 'follow'\n };\n\n fetch(\"https://shealthapi.servatom.com/doctor/details/\", requestOptions)\n .then(response => response.json() )\n .then(result => {\n if(result.doctor_name)\n {\n swal({\n title: \"Add Doctor?\",\n text: `Are you sure you want to give Dr. ${result.doctor_name} (${result.doctor_speciality}) to view your documents?`,\n icon: \"warning\",\n buttonColor: '#b793da', \n buttons: true,\n dangerMode: false,\n })\n .then((giveAccess) => {\n if (giveAccess) {\n\n setInputID('');\n swal(\"Permission granted!\", {\n icon: \"success\",\n });\n\n var myHeaders = new Headers();\n myHeaders.append(\"Authorization\", \"Token \"+authCtx.token);\n myHeaders.append(\"Content-Type\", \"application/json\");\n\n var raw = JSON.stringify({\n \"doc_id\": inputID\n });\n\n var requestOptions = {\n method: 'POST',\n headers: myHeaders,\n body: raw,\n redirect: 'follow'\n };\n\n fetch(\"https://shealthapi.servatom.com/patient/access/doc_id/\", requestOptions)\n .then(response => {\n getDocList()\n return response.text()\n })\n .then(result => console.log(result))\n .catch(error => console.log('error', error));\n\n } \n });\n }\n else\n {\n swal({\n title: \"No Doctor Found!\",\n text: \"Please Enter a valid Doctor ID\",\n icon: \"error\",\n showConfirmButton: true,\n confirmButtonColor: \"#b793da\",\n confirmButtonText: 'OK',\n cancelButtonColor: \"#b793da\"\n })\n }\n })\n .catch(error => {\n console.log('error', error)\n swal({\n title: \"No Doctor Found!\",\n text: \"Please Enter a valid Doctor ID\",\n icon: \"error\",\n showConfirmButton: true,\n confirmButtonColor: \"#b793da\",\n confirmButtonText: 'OK',\n cancelButtonColor: \"#b793da\"\n })\n });\n }\n \n \n const getDocList=()=>\n {\n var myHeaders = new Headers();\n myHeaders.append(\"Authorization\", \"Token \"+authCtx.token);\n\n var requestOptions = {\n method: 'GET',\n headers: myHeaders,\n redirect: 'follow'\n };\n\n fetch(\"https://shealthapi.servatom.com/patient/dlist/\", requestOptions)\n .then(response => response.json())\n .then(result => setDocList(result))\n .catch(error => console.log('error', error));\n }\n\n useEffect(()=>{\n getDocList();\n },[])\n\n return(\n <>\n
\n
\n \n \n
\n
\n
\n {\n docList.length?\n
\n

Doctor Name

\n

Speciality

\n

Email

\n

Phone

\n
:null\n }\n {\n docList.length?\n docList.map((doc)=>{\n console.log(doc);\n return ()\n })\n :

No doctors added yet

\n }\n
\n \n )\n}\n\nexport default AddDoc;","import { useContext, useEffect, useState } from \"react\";\nimport \"../assets/css/Dashboard.css\";\nimport Addfile from \"../components/Addfile\";\nimport Record from \"../components/Record\";\nimport RecordList from \"../components/RecordList\";\nimport SideNav from \"../components/SideNav\";\nimport AuthContext from \"../store/auth-context\";\nimport { BrowserRouter as Router, Switch, Route } from 'react-router-dom';\nimport AddDoc from \"../components/AddDoc\";\n\n\nconst Dashboard=()=>\n{\n \n const [profile, setProfile]= useState({});\n const [addFile, setAddFile] = useState(false);\n\n const authCtx = useContext(AuthContext);\n\n\n\n\n useEffect(()=>{\n var myHeaders = new Headers();\n myHeaders.append(\"Authorization\", \"Token \"+authCtx.token);\n myHeaders.append(\"Content-Type\", \"application/json\");\n \n \n var raw = JSON.stringify({\n \"email\": authCtx.email\n });\n\n var requestOptions = {\n method: 'POST',\n headers: myHeaders,\n body: raw,\n redirect: 'follow'\n };\n\n fetch(\"https://shealthapi.servatom.com/detail/\", requestOptions)\n .then(response => response.json())\n .then(result => {\n console.log(result)\n setProfile(result);\n })\n .catch(error => console.log('error', error));\n },[])\n\n \n const [records, setRecords] = useState(()=>[]);\n \n const getRecords=()=>{\n\n var myHeaders = new Headers();\n myHeaders.append(\"Authorization\", \"Token \"+authCtx.token);\n myHeaders.append(\"Content-Type\", \"application/json\");\n\n var raw = JSON.stringify({\n \"email\": authCtx.email\n });\n\n var requestOptions = {\n method: 'POST',\n headers: myHeaders,\n body: raw,\n redirect: 'follow'\n };\n\n fetch(\"https://shealthapi.servatom.com/patient/records/\", requestOptions)\n .then(response => response.json())\n .then(result => {\n console.log(result);\n setRecords(result);\n })\n .catch(error => console.log('error', error));\n\n }\n\n useEffect(()=>{\n getRecords();\n },[])\n\n const [currentTab, setCurrentTab] = useState(1);\n\n return(\n \n
\n
\n \n
\n
\n

Welcome, {profile.name}!

\n
\n \n \n \n \n\n \n

Reports

\n
\n\n \n \n \n\n \n

Settings

\n
\n
\n
\n
\n {\n addFile?\n \n :null\n }\n
\n )\n}\n\nexport default Dashboard;","import './App.css';\nimport LandingPage from './pages/LandingPage';\nimport {BrowserRouter as Router, Route, Switch, Redirect} from 'react-router-dom';\nimport Register from './pages/Register';\nimport Login from './pages/Login';\nimport Dashboard from './pages/Dashboard';\nimport { useContext } from 'react';\nimport AuthContext from './store/auth-context';\n\n\nfunction App() {\n \n const authCtx = useContext(AuthContext);\n \n return (\n \n \n \n \n { authCtx.isLoggedIn?\n \n :}\n \n \n \n \n {!authCtx.isLoggedIn && (\n \n \n )}\n {authCtx.isLoggedIn && (\n \n \n )}\n \n {\n authCtx.isLoggedIn?:\n }\n \n \n \n );\n}\n\nexport default App;\n","import React from 'react';\nimport ReactDOM from 'react-dom';\nimport './index.css';\nimport App from './App';\nimport { AuthContextProvider } from './store/auth-context';\n\nReactDOM.render(\n \n \n \n \n ,\n document.getElementById('root')\n);\n\n\n"],"sourceRoot":""}