fix: guest route
This commit is contained in:
+4
-13
@@ -46,6 +46,7 @@ import { useSettings } from '@core/hooks/useSettings'
|
||||
import { getLocalizedUrl } from '@/utils/i18n'
|
||||
import { useAuthMutation } from '../services/mutations/auth'
|
||||
import { CircularProgress } from '@mui/material'
|
||||
import { toast } from 'react-toastify'
|
||||
|
||||
// Styled Custom Components
|
||||
const LoginIllustration = styled('img')(({ theme }) => ({
|
||||
@@ -117,8 +118,8 @@ const Login = ({ mode }: { mode: SystemMode }) => {
|
||||
} = useForm<FormData>({
|
||||
resolver: valibotResolver(schema),
|
||||
defaultValues: {
|
||||
email: 'guapatlu@jambi.com',
|
||||
password: '12345678'
|
||||
email: '',
|
||||
password: ''
|
||||
}
|
||||
})
|
||||
|
||||
@@ -146,7 +147,7 @@ const Login = ({ mode }: { mode: SystemMode }) => {
|
||||
}
|
||||
},
|
||||
onError: (error: any) => {
|
||||
setErrorState(error.response.data)
|
||||
toast.error(error.response.data.message)
|
||||
}
|
||||
})
|
||||
}
|
||||
@@ -262,16 +263,6 @@ const Login = ({ mode }: { mode: SystemMode }) => {
|
||||
Create an account
|
||||
</Typography>
|
||||
</div>
|
||||
<Divider className='gap-2'>or</Divider>
|
||||
<Button
|
||||
color='secondary'
|
||||
className='self-center text-textPrimary'
|
||||
startIcon={<img src='/images/logos/google.png' alt='Google' width={22} />}
|
||||
sx={{ '& .MuiButton-startIcon': { marginInlineEnd: 3 } }}
|
||||
onClick={() => console.log('google')}
|
||||
>
|
||||
Sign in with Google
|
||||
</Button>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user