Skip to content

Commit 6bd94f2

Browse files
committed
fix(check): button visibility and error message placement.
1 parent 526c6e7 commit 6bd94f2

1 file changed

Lines changed: 4 additions & 3 deletions

File tree

components/steps/S2Username.tsx

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,8 @@ const S2Username = () => {
6363
}
6464
}).catch(err => {
6565
setIsUsernameError(true);
66-
toast.error(err.message)
66+
setUsernameError(err.message);
67+
setUserNameOK(false);
6768
}).finally(() => {
6869
setIsChecking(false);
6970
})
@@ -108,13 +109,13 @@ const S2Username = () => {
108109
{"<"}
109110
</button>
110111

111-
{userNameOK && !userNameCheckOK ?
112+
{!userNameCheckOK ?
112113
<button
113114
onClick={handleUsernameCheck}
114115
disabled={!userNameOK || isChecking}
115116
className={`
116117
btn-small rounded-full py-2 px-4
117-
${userNameOK ? "bg-blue-500 text-white" : "bg-gray-400 text-gray-700"}
118+
${userNameOK ? "bg-blue-500 text-white" : "bg-gray-200 text-gray-300"}
118119
`}
119120
tabIndex={2}
120121
>

0 commit comments

Comments
 (0)