80 |
81 |
setUsername(e.target.value)}
84 | id="username"
85 | placeholder="Your unique username"
86 | />
87 | {allUsernames.includes(username) &&
88 | username !== userData.username ? (
89 |
90 |
Username is taken.
91 |
92 | ) : null}
93 | {filter.isProfane(username) ? (
94 |
95 |
Choose an
96 | appropriate username.
97 |
98 | ) : null}
99 | {!validateUsername(username) ? (
100 |
101 |
{" "}
102 | Only use lowercase letters, numbers, underscores, & dots
103 | (cannot start/end with last 2).
104 |
105 | ) : null}
106 | {username.length === 0 ? (
107 |
108 |
Username cannot be
109 | empty.
110 |
111 | ) : username.length > 16 ? (
112 |
113 |
Username is too
114 | long.
115 |
116 | ) : null}
117 |
119 |
120 |
setName(e.target.value)}
123 | id="name"
124 | placeholder="Name displayed on your profile"
125 | />
126 | {name.length === 0 ? (
127 |
128 |
Your name cannot be
129 | empty.
130 |
131 | ) : name.length > 16 ? (
132 |
133 |
Your name is too
134 | long.
135 |
136 | ) : null}
137 |