Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit b445f04

Browse files
committed
Make username readonly and disabled in settings
1 parent 182b79c commit b445f04

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

src/components/settings/ProfileSettings.tsx

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ export default function ProfileSettings() {
3030
},
3131
body: JSON.stringify({
3232
user: {
33-
username: data.username,
33+
// username: data.username,
3434
image: data.image,
3535
account: {
3636
firstName: data.firstName,
@@ -96,6 +96,10 @@ export default function ProfileSettings() {
9696
<div className="col-span-4 flex flex-col-reverse md:grid md:grid-cols-4">
9797
<div className="flex md:col-span-3 flex-col gap-6 max-w-lg">
9898
<Input
99+
disabled={true}
100+
readOnly={true}
101+
aria-readonly={true}
102+
aria-disabled={true}
99103
label="Username"
100104
type="text"
101105
leadingAddon="coderplex.org/"
@@ -125,7 +129,6 @@ export default function ProfileSettings() {
125129
: 'This field is required'
126130
}
127131
/>
128-
129132
<Input
130133
label="Profile Picture"
131134
type="url"

0 commit comments

Comments
 (0)