fix: guest route

This commit is contained in:
ferdiansyah783
2025-08-14 00:29:19 +07:00
parent c01db516b1
commit 1cd8adc1e2
9 changed files with 32 additions and 34 deletions
+4 -13
View File
@@ -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>