Compare commits
5 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| f41a9961ae | |||
| 9376f96543 | |||
| 500c54d442 | |||
| 85bd79a612 | |||
| 1be78e7484 |
@@ -1,4 +1,4 @@
|
||||
|
||||
.auth-gray {
|
||||
background-color: $gray-200;
|
||||
.auth-height {
|
||||
min-height: 100vh;
|
||||
}
|
||||
@@ -54,9 +54,9 @@ const AuthLayout = () => {
|
||||
}, [])
|
||||
|
||||
return (
|
||||
<div className='d-flex flex-column flex-lg-row flex-column-fluid overflow-auto' style={{backgroundImage: `${bgColor.backgroundImage}`}}>
|
||||
<div className='auth-height d-flex flex-column flex-lg-row flex-column-fluid' style={{backgroundImage: `${bgColor.backgroundImage}`}}>
|
||||
{/* begin::Body */}
|
||||
<div className='d-flex flex-column flex-lg-row-fluid w-lg-50 p-10 order-2 order-lg-1 vh-100'>
|
||||
<div className='d-flex flex-column flex-lg-row-fluid w-lg-50 p-10 order-2 order-lg-1'>
|
||||
{/* begin::Form */}
|
||||
<div className='d-flex flex-center flex-column flex-lg-row-fluid'>
|
||||
<div className='text-center mb-11'>
|
||||
@@ -64,7 +64,7 @@ const AuthLayout = () => {
|
||||
<img alt='Float Mobility' src={toAbsoluteUrl('/media/logos/logo.png')} className='h-35px' />
|
||||
</div>
|
||||
{/* begin::Wrapper */}
|
||||
<div className='auth-gray w-lg-500px p-10 shadow-lg rounded-sm'>
|
||||
<div className='bg-white w-lg-500px p-10 shadow-lg rounded'>
|
||||
<Outlet />
|
||||
</div>
|
||||
{/* end::Wrapper */}
|
||||
@@ -99,59 +99,6 @@ const AuthLayout = () => {
|
||||
</div>
|
||||
{/* end::Body */}
|
||||
|
||||
{/* begin::Aside */}
|
||||
<div
|
||||
className='position-relative d-flex flex-lg-row-fluid w-lg-50 p-10 order-1 order-lg-2'
|
||||
>
|
||||
{/* begin::Content */}
|
||||
<div className='position-relative d-flex flex-column flex-center px-5 px-md-15 w-100'>
|
||||
{/* begin::Logo */}
|
||||
{/* <Link to='/' className='mb-12'>
|
||||
<img alt='Float Mobility' src={toAbsoluteUrl('/media/logos/logo.png')} className='h-35px' />
|
||||
</Link> */}
|
||||
{/* end::Logo */}
|
||||
|
||||
{/* <img
|
||||
className='mx-auto w-350px w-md-50 w-xl-500px mb-10 mb-lg-20 rounded'
|
||||
src={toAbsoluteUrl('/media/misc/auth-bg-new.png')}
|
||||
alt=''
|
||||
style={{boxShadow: '0px 0px 10px white'}}
|
||||
/> */}
|
||||
<div className='mx-auto w-75 w-xl-500px mb-10 mb-lg-20 rounded'>
|
||||
<img
|
||||
className='img-fluid rounded'
|
||||
src={toAbsoluteUrl('/media/misc/auth-bg-new.png')}
|
||||
alt=''
|
||||
// style={{boxShadow: '0px 0px 10px white'}}
|
||||
/>
|
||||
</div>
|
||||
{/* end::Image */}
|
||||
<div className='w-100 w-md-75'>
|
||||
{/* begin::Title */}
|
||||
<h1 className='text-dark fs-2qx fw-bolder text-center mb-7'>
|
||||
Fast, Efficient and Productive
|
||||
</h1>
|
||||
{/* end::Title */}
|
||||
|
||||
{/* begin::Text */}
|
||||
{/* <div className='text-dark fs-base text-center'>
|
||||
In this kind of post,{' '}
|
||||
<a href='#' className='opacity-75-hover text-warning fw-bold me-1'>
|
||||
the blogger
|
||||
</a>
|
||||
introduces a person they’ve interviewed <br /> and provides some background information
|
||||
about {' '}
|
||||
<a href='#' className='opacity-75-hover text-warning fw-bold me-1'>
|
||||
the interviewee
|
||||
</a>
|
||||
and their <br /> work following this is a transcript of the interview.
|
||||
</div> */}
|
||||
{/* end::Text */}
|
||||
</div>
|
||||
</div>
|
||||
{/* end::Content */}
|
||||
</div>
|
||||
{/* end::Aside */}
|
||||
</div>
|
||||
)
|
||||
}
|
||||
|
||||
@@ -23,8 +23,8 @@ const loginSchema = Yup.object().shape({
|
||||
})
|
||||
|
||||
const initialValues = {
|
||||
email: 'demo@float.sg',
|
||||
password: '****',
|
||||
email: '',
|
||||
password: '',
|
||||
}
|
||||
//email: 'admin@demo.com',
|
||||
/*
|
||||
@@ -45,10 +45,8 @@ export function Login() {
|
||||
setLoading(true)
|
||||
try {
|
||||
const {data: auth} = await login(values.email, values.password)
|
||||
console.log('yes')
|
||||
saveAuth(auth)
|
||||
// const {data: user} = await getUserByToken(auth.session_token)
|
||||
console.log('yes2')
|
||||
// setCurrentUser(user)
|
||||
setCurrentUser(auth.profile)
|
||||
navigate('/dashboard')
|
||||
|
||||
@@ -69,15 +69,18 @@ const AuthInit: FC<WithChildren> = ({children}) => {
|
||||
const requestUser = async (apiToken: string) => {
|
||||
try {
|
||||
if (!didRequest.current) {
|
||||
const {data} = await getUserByToken(apiToken)
|
||||
if (data) {
|
||||
setCurrentUser(data)
|
||||
// const {data} = await getUserByToken(apiToken)
|
||||
// if (data) {
|
||||
// setCurrentUser(data)
|
||||
// }
|
||||
if (localStorage.getItem('kt-auth-react-v')) {
|
||||
setCurrentUser(auth.profile)
|
||||
}
|
||||
}
|
||||
} catch (error) {
|
||||
console.error(error)
|
||||
if (!didRequest.current) {
|
||||
// logout()
|
||||
logout()
|
||||
}
|
||||
} finally {
|
||||
setShowSplashScreen(false)
|
||||
|
||||
Reference in New Issue
Block a user