Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit1800982

Browse files
committed
move things to the right place
1 parentbbce1af commit1800982

File tree

3 files changed

+3
-5
lines changed

3 files changed

+3
-5
lines changed

‎site/src/components/SettingsAccountForm/SettingsAccountForm.test.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,12 +12,12 @@ describe("AccountForm", () => {
1212
// Given
1313
constmockInitialValues:AccountFormValues={
1414
username:MockUser2.username,
15-
editable:true,
1615
}
1716

1817
// When
1918
render(
2019
<AccountForm
20+
editable
2121
email={MockUser2.email}
2222
initialValues={mockInitialValues}
2323
isLoading={false}
@@ -38,12 +38,12 @@ describe("AccountForm", () => {
3838
// Given
3939
constmockInitialValues:AccountFormValues={
4040
username:MockUser2.username,
41-
editable:false,
4241
}
4342

4443
// When
4544
render(
4645
<AccountForm
46+
editable={false}
4747
email={MockUser2.email}
4848
initialValues={mockInitialValues}
4949
isLoading={false}

‎site/src/components/SettingsAccountForm/SettingsAccountForm.tsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@ import { LoadingButton } from "../LoadingButton/LoadingButton"
88
import{Stack}from"../Stack/Stack"
99

1010
exportinterfaceAccountFormValues{
11-
editable:boolean
1211
username:string
1312
}
1413

‎site/src/pages/UserSettingsPage/AccountPage/AccountPage.tsx

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,13 +21,12 @@ export const AccountPage: React.FC = () => {
2121
return(
2222
<Sectiontitle={Language.title}>
2323
<AccountForm
24+
editable={!!canEditUsers}
2425
email={me.email}
2526
updateProfileError={updateProfileError}
2627
isLoading={authState.matches("signedIn.profile.updatingProfile")}
2728
initialValues={{
2829
username:me.username,
29-
// Fail-open, as the API endpoint will check again on submit
30-
editable:canEditUsers||false,
3130
}}
3231
onSubmit={(data)=>{
3332
authSend({

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp