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AA,EAAAA,GAAeD,EAAO9B,EAA0B9G,EAAQ,EAqD/C8I,CAAkBxB,GAClC,OAAoB/E,EAAAA,EAAAA,KAAK2E,GAAeS,EAAAA,EAAAA,GAAS,CAC/C/H,WAAWgC,EAAAA,EAAAA,GAAK5B,EAAQf,KAAMW,GAC9BmJ,GAAI/C,EACJgD,MAAOzB,GAAoBlB,EAAQ,WAAQ4C,EAC3Cb,IAAKA,EACL1F,MAAOgG,EACPpB,WAAYA,EACZgB,IAAKf,EAAmBlB,GAASiC,OAAMW,GACtCV,EAAO,CACRjG,SAAUA,IAEd,G","sources":["views/Auth/Login/components/LoginForm/LoginForm.js","views/Auth/Login/Login.js","../node_modules/@mui/icons-material/Lock.js","../node_modules/@mui/material/CardMedia/cardMediaClasses.js","../node_modules/@mui/material/CardMedia/CardMedia.js"],"sourcesContent":["/* eslint-disable no-unused-vars */\r\nimport React, { useState, useEffect } from 'react';\r\nimport validate from 'validate.js';\r\nimport clsx from 'clsx';\r\nimport PropTypes from 'prop-types';\r\nimport { useDispatch } from 'react-redux';\r\nimport { makeStyles } from '@mui/styles';\r\nimport { Button, TextField, Typography } from '@mui/material';\r\n\r\nimport useRouter from 'utils/useRouter';\r\nimport { login } from '../../../../../actions/sessionActions.js';\r\n\r\nconst schema = {\r\n\temail: {\r\n\t\tpresence: { allowEmpty: false, message: 'is required' },\r\n\t\temail: true,\r\n\t},\r\n\tpassword: {\r\n\t\tpresence: { allowEmpty: false, message: 'is required' },\r\n\t},\r\n};\r\n\r\nconst useStyles = makeStyles((theme) => ({\r\n\troot: {},\r\n\tfields: {\r\n\t\tmargin: theme.spacing(-1),\r\n\t\tdisplay: 'flex',\r\n\t\tflexWrap: 'wrap',\r\n\t\t'& > *': {\r\n\t\t\tflexGrow: 1,\r\n\t\t\tmargin: theme.spacing(1),\r\n\t\t},\r\n\t},\r\n\tsubmitButton: {\r\n\t\tmarginTop: theme.spacing(2),\r\n\t\twidth: '100%',\r\n\t},\r\n}));\r\n\r\nconst LoginForm = (props) => {\r\n\tconst { className, ...rest } = props;\r\n\r\n\tconst classes = useStyles();\r\n\tconst router = useRouter();\r\n\tconst dispatch = useDispatch();\r\n\r\n\tconst [formState, setFormState] = useState({\r\n\t\tisValid: false,\r\n\t\tvalues: {},\r\n\t\ttouched: {},\r\n\t\terrors: {},\r\n\t});\r\n\r\n\tconst [errorState, setErrorState] = useState();\r\n\r\n\tuseEffect(() => {\r\n\t\tconst errors = validate(formState.values, schema);\r\n\r\n\t\tsetFormState((items) => ({\r\n\t\t\t...items,\r\n\t\t\tisValid: !errors,\r\n\t\t\terrors: errors || {},\r\n\t\t}));\r\n\t}, [formState.values]);\r\n\r\n\tconst handleChange = (event) => {\r\n\t\tsetFormState((items) => ({\r\n\t\t\t...items,\r\n\t\t\tvalues: {\r\n\t\t\t\t...items.values,\r\n\t\t\t\t[event.target.name]:\r\n\t\t\t\t\tevent.target.type === 'checkbox'\r\n\t\t\t\t\t\t? event.target.checked\r\n\t\t\t\t\t\t: event.target.value,\r\n\t\t\t},\r\n\t\t\ttouched: {\r\n\t\t\t\t...items.touched,\r\n\t\t\t\t[event.target.name]: true,\r\n\t\t\t},\r\n\t\t}));\r\n\t};\r\n\r\n\tconst handleSubmit = async (event) => {\r\n\t\tevent.preventDefault();\r\n\t\tdispatch(login(formState.values.email, formState.values.password)).then(() => {\r\n\t\t\trouter.history.push('/');\r\n\t\t}).catch(error => {\r\n\t\t\tsetErrorState(error.message);\r\n\t\t});\r\n\t};\r\n\r\n\tconst hasError = (field) => (!!(formState.touched[field] && formState.errors[field]));\r\n\r\n\treturn (\r\n\t\t
\r\n\r\n\t);\r\n};\r\n\r\nLoginForm.propTypes = {\r\n\tclassName: PropTypes.string,\r\n};\r\n\r\nexport default LoginForm;\r\n","import React from 'react';\r\nimport { Link as RouterLink } from 'react-router-dom';\r\nimport { makeStyles } from '@mui/styles';\r\nimport {\r\n\tCard,\r\n\tCardContent,\r\n\tCardMedia,\r\n\tTypography,\r\n\tDivider,\r\n\tLink,\r\n} from '@mui/material';\r\nimport LockIcon from '@mui/icons-material/Lock';\r\n\r\nimport { Page } from 'components';\r\nimport gradients from 'utils/gradients';\r\nimport { LoginForm } from './components';\r\n\r\nconst useStyles = makeStyles((theme) => ({\r\n\troot: {\r\n\t\theight: '100%',\r\n\t\tdisplay: 'flex',\r\n\t\talignItems: 'center',\r\n\t\tjustifyContent: 'center',\r\n\t\tpadding: theme.spacing(6, 2),\r\n\t},\r\n\tcard: {\r\n\t\twidth: theme.breakpoints.values.md,\r\n\t\tmaxWidth: '100%',\r\n\t\toverflow: 'unset',\r\n\t\tdisplay: 'flex',\r\n\t\tposition: 'relative',\r\n\t\t'& > *': {\r\n\t\t\tflexGrow: 1,\r\n\t\t\tflexBasis: '50%',\r\n\t\t\twidth: '50%',\r\n\t\t},\r\n\t},\r\n\tcontent: {\r\n\t\tpadding: theme.spacing(8, 4, 3, 4),\r\n\t},\r\n\tmedia: {\r\n\t\tborderTopRightRadius: 4,\r\n\t\tborderBottomRightRadius: 4,\r\n\t\tpadding: theme.spacing(3),\r\n\t\tcolor: theme.palette.white,\r\n\t\tdisplay: 'flex',\r\n\t\tflexDirection: 'column',\r\n\t\tjustifyContent: 'flex-end',\r\n\t\t[theme.breakpoints.down('lg')]: {\r\n\t\t\tdisplay: 'none',\r\n\t\t},\r\n\t},\r\n\ticon: {\r\n\t\tbackgroundImage: gradients.green,\r\n\t\tcolor: theme.palette.white,\r\n\t\tborderRadius: theme.shape.borderRadius,\r\n\t\tpadding: theme.spacing(1),\r\n\t\tposition: 'absolute',\r\n\t\ttop: -32,\r\n\t\tleft: theme.spacing(3),\r\n\t\theight: 64,\r\n\t\twidth: 64,\r\n\t\tfontSize: 32,\r\n\t},\r\n\tloginForm: {\r\n\t\tmarginTop: theme.spacing(3),\r\n\t},\r\n\tdivider: {\r\n\t\tmargin: theme.spacing(2, 0),\r\n\t},\r\n\tperson: {\r\n\t\tmarginTop: theme.spacing(2),\r\n\t\tdisplay: 'flex',\r\n\t},\r\n\tavatar: {\r\n\t\tmarginRight: theme.spacing(2),\r\n\t},\r\n}));\r\n\r\nconst Login = () => {\r\n\tconst classes = useStyles();\r\n\r\n\treturn (\r\n\t\t