We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent cc1481a commit 5fa8263Copy full SHA for 5fa8263
1 file changed
app/components/Header/AuthModal.client.vue
@@ -22,9 +22,23 @@ async function handleCreateAccount() {
22
23
async function handleLogin() {
24
if (handleInput.value) {
25
- await authRedirect(handleInput.value.trim().replace('@', ''))
+ await authRedirect(handleInput.value)
26
}
27
28
+
29
+watch(handleInput, newHandleInput => {
30
+ if (!newHandleInput) return
31
32
+ const normalized = newHandleInput
33
+ .trim()
34
+ .replace(/^@/, '')
35
+ .toLowerCase()
36
+ .replace(/[^a-z0-9.-]/g, '')
37
38
+ if (normalized !== newHandleInput) {
39
+ handleInput.value = normalized
40
+ }
41
+})
42
</script>
43
44
<template>
0 commit comments