fix: path

This commit is contained in:
ferdiansyah783
2025-08-09 22:38:12 +07:00
parent 67b747f0ff
commit de93de2e6d
16 changed files with 31 additions and 32 deletions
+3 -8
View File
@@ -45,6 +45,7 @@ import { useSettings } from '@core/hooks/useSettings'
// Util Imports
import { getLocalizedUrl } from '@/utils/i18n'
import { useAuthMutation } from '../services/mutations/auth'
import { CircularProgress } from '@mui/material'
// Styled Custom Components
const LoginIllustration = styled('img')(({ theme }) => ({
@@ -134,7 +135,7 @@ const Login = ({ mode }: { mode: SystemMode }) => {
const onSubmit: SubmitHandler<FormData> = async (data: FormData) => {
login.mutate(data)
const redirectURL = searchParams.get('redirectTo') ?? '/'
const redirectURL = searchParams.get('redirectTo') ?? '/dashboards/overview'
router.replace(getLocalizedUrl(redirectURL, locale as Locale))
}
@@ -161,12 +162,6 @@ const Login = ({ mode }: { mode: SystemMode }) => {
<Typography variant='h4'>{`Welcome to ${themeConfig.templateName}! 👋🏻`}</Typography>
<Typography>Please sign-in to your account and start the adventure</Typography>
</div>
<Alert icon={false} className='bg-[var(--mui-palette-primary-lightOpacity)]'>
<Typography variant='body2' color='primary.main'>
Email: <span className='font-medium'>admin@vuexy.com</span> / Pass:{' '}
<span className='font-medium'>admin</span>
</Typography>
</Alert>
<form
noValidate
autoComplete='off'
@@ -244,7 +239,7 @@ const Login = ({ mode }: { mode: SystemMode }) => {
</Typography>
</div>
<Button fullWidth variant='contained' type='submit' disabled={login.isPending}>
{login.isPending ? 'Login...' : 'Login'}
{login.isPending ? <CircularProgress size={16} /> : 'Login'}
</Button>
<div className='flex justify-center items-center flex-wrap gap-2'>
<Typography>New on our platform?</Typography>