Skip to content

Commit

Permalink
fix: force handle text inputs to enter in lowercase.
Browse files Browse the repository at this point in the history
Fixes: #289
  • Loading branch information
zicklag committed Jan 19, 2025
1 parent 5b940d4 commit 68b97c3
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,10 @@
let selectedTab = $state(0);
let handle = $state('');
$effect(() => {
const lowercase = handle.toLowerCase();
if (lowercase != handle) handle = lowercase;
});
let domain = $state('');
let error = $state(null) as null | string;
let publicSuffix = $state(usernames.defaultSuffix());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,10 @@
} = $props();
let handle = $state('');
$effect(() => {
const lowercase = handle.toLowerCase();
if (lowercase != handle) handle = lowercase;
});
let randomNumberSuffix = $state(usernames.genRandomUsernameSuffix());
let publicSuffix = $state(usernames.defaultSuffix());
let fullHandleSuffix = $derived(
Expand Down

0 comments on commit 68b97c3

Please sign in to comment.