-
Notifications
You must be signed in to change notification settings - Fork 7
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
👁️ fix: email read only in UserInfoModal #218
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
const handleEmailChange = (value: string) => {
if (!userInfo) return;
setUserInfo((prev) => ({ ...prev!, email: value }));
const regex = /^[a-zA-Z0-9+_.-]+@[a-zA-Z0-9.-]+$/; // Regex pattern for email
if (value.length === 0) {
setErrorMsg((prep) => ({ ...prep, email: "Email 欄位不可空白" }));
} else if (!regex.test(value)) {
setErrorMsg((prep) => ({ ...prep, email: "Email 格式錯誤" }));
} else {
setErrorMsg((prep) => ({ ...prep, email: "" }));
}
};
第 78 行,因為 email 改成只讀,handleEmailChange 這個 function 沒使用到可以先移除
9061ddf
to
c69b0d3
Compare
@JohnsonMao |
c69b0d3
to
a206985
Compare
Kudos, SonarCloud Quality Gate passed!
|
✅ Knip Scan Result for a206985 Unused files (8)
Unused dependencies (3)
Unused devDependencies (4)
Unused exports (3)
Unused exports in namespaces (7)
Unused exported types (22)
Unused exported types in namespaces (33)
Duplicate exports (10)
Configuration issues (1)
|
🤖 Lighthouse Scan Result for a206985 /rooms
/rooms/abc
/login
|
Why need this change? / Root cause:
Changes made:
Test Scope / Change impact:
Issue