diff --git a/src/components/auth/Login.tsx b/src/components/auth/Login.tsx index c1c60e0..95ca5c7 100644 --- a/src/components/auth/Login.tsx +++ b/src/components/auth/Login.tsx @@ -5,6 +5,7 @@ import { useNavigate, useLocation } from "react-router-dom"; import { RouteHandler } from "../../router/routes"; import { RequestStatus } from "../../core/models"; import { employerLogin } from "../../core/apiRequest"; +import ErrorMsg from "../shared/ErrorMsg"; type FormType = { @@ -51,7 +52,7 @@ export default function Login() { employerLogin(reqData).then(res => { // console.log('RES', res) if(!res?.data?.call_return){ - setRequestStatus({loading:false, status:false, message:'Email/Password is wrong', data:{}}) + setRequestStatus({loading:false, status:false, message:res?.data?.status_message || 'Invalid Details', data:{}}) return setTimeout(()=>{ setRequestStatus({loading:false, status:null, message:'', data:{}}) },4000) @@ -138,6 +139,12 @@ export default function Login() { +
+ +
@@ -150,7 +157,7 @@ export default function Login() {
diff --git a/src/components/auth/OTP.tsx b/src/components/auth/OTP.tsx index 76cb937..eee1cf5 100644 --- a/src/components/auth/OTP.tsx +++ b/src/components/auth/OTP.tsx @@ -6,6 +6,7 @@ import { updateUserDetails } from "../../store/UserDetails"; import { useDispatch } from "react-redux"; import { verifyOTP } from "../../core/apiRequest"; import { RequestStatus } from "../../core/models"; +import ErrorMsg from "../shared/ErrorMsg"; type FormType = { [index: string] : string @@ -180,6 +181,13 @@ export default function Login() { {/* Forget your password? */}
+ +
+ +
diff --git a/src/components/shared/CustomSpinner.tsx b/src/components/shared/CustomSpinner.tsx index 94d4468..bebd7fa 100644 --- a/src/components/shared/CustomSpinner.tsx +++ b/src/components/shared/CustomSpinner.tsx @@ -1,10 +1,10 @@ type Props = { - size?: string + width?: string + height?: string } -export default function CustomSpinner({size='8'}:Props) { - let width = `w-${size}` - let height = `h-${size}` +export default function CustomSpinner({width='w-6', height='h-6'}:Props) { + return (
+

+ {message && message} +

+
+ ) +}