feat(login): support login with business email or phone number
Some checks failed
Beta CI/CD Pipeline / build-and-test (push) Failing after 44s
Beta CI/CD Pipeline / deploy-beta (push) Has been skipped

This commit is contained in:
vickytechkey 2026-08-13 10:14:56 +05:30
parent f78cf6fe02
commit 120fdcc69a

View file

@ -460,10 +460,8 @@ export default function App() {
const handleLoginSubmit = (e: React.FormEvent) => {
e.preventDefault()
// Email Validation
const emailRegex = /^[^\s@]+@[^\s@]+\.[^\s@]+$/;
if (!emailRegex.test(email)) {
alert('Please enter a valid email address.');
if (!email.trim()) {
alert('Please enter your email or phone number.');
return;
}
@ -977,12 +975,12 @@ export default function App() {
<form onSubmit={handleLoginSubmit}>
<h2 className="form-card-title">Supplier Portal Access</h2>
<div className="form-group">
<label htmlFor="login-email">Business Email</label>
<label htmlFor="login-email">Business Email or Phone Number</label>
<input
id="login-email"
type="email"
type="text"
className="form-control"
placeholder="Enter your email"
placeholder="Enter your email or phone number"
value={email}
onChange={(e) => setEmail(e.target.value)}
required