Skip to content

Commit f46799e

Browse files
committed
Lint, export Language
1 parent c2f6cce commit f46799e

File tree

4 files changed

+14
-15
lines changed

4 files changed

+14
-15
lines changed

site/src/components/CreateUserForm/CreateUserForm.stories.tsx

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -12,32 +12,32 @@ const Template: Story<CreateUserFormProps> = (args: CreateUserFormProps) => <Cre
1212

1313
export const Ready = Template.bind({})
1414
Ready.args = {
15-
onCancel: action('cancel'),
16-
onSubmit: action('submit'),
15+
onCancel: action("cancel"),
16+
onSubmit: action("submit"),
1717
isLoading: false,
1818
}
1919

2020
export const UnknownError = Template.bind({})
2121
UnknownError.args = {
22-
onCancel: action('cancel'),
23-
onSubmit: action('submit'),
22+
onCancel: action("cancel"),
23+
onSubmit: action("submit"),
2424
isLoading: false,
25-
error: "Something went wrong"
25+
error: "Something went wrong",
2626
}
2727

2828
export const FormError = Template.bind({})
2929
FormError.args = {
30-
onCancel: action('cancel'),
31-
onSubmit: action('submit'),
30+
onCancel: action("cancel"),
31+
onSubmit: action("submit"),
3232
isLoading: false,
3333
formErrors: {
34-
email: "Bad email address"
35-
}
34+
email: "Bad email address",
35+
},
3636
}
3737

3838
export const Loading = Template.bind({})
3939
Loading.args = {
40-
onCancel: action('cancel'),
41-
onSubmit: action('submit'),
40+
onCancel: action("cancel"),
41+
onSubmit: action("submit"),
4242
isLoading: true,
4343
}

site/src/components/CreateUserForm/CreateUserForm.tsx

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ import { getFormHelpers, onChangeTrimmed } from "../../util/formUtils"
88
import { FormFooter } from "../FormFooter/FormFooter"
99
import { FullPageForm } from "../FullPageForm/FullPageForm"
1010

11-
const Language = {
11+
export const Language = {
1212
emailLabel: "Email",
1313
passwordLabel: "Password",
1414
usernameLabel: "Username",
@@ -45,7 +45,6 @@ export const CreateUserForm: React.FC<CreateUserFormProps> = ({ onSubmit, onCanc
4545
onSubmit,
4646
})
4747
const getFieldHelpers = getFormHelpers<CreateUserRequest>(form, formErrors)
48-
console.log(getFieldHelpers("email"))
4948

5049
return (
5150
<FullPageForm title="Create user" onCancel={onCancel}>

site/src/components/FormFooter/FormFooter.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import { makeStyles } from "@material-ui/core/styles"
33
import React from "react"
44
import { LoadingButton } from "../LoadingButton/LoadingButton"
55

6-
const Language = {
6+
export const Language = {
77
cancelLabel: "Cancel",
88
defaultSubmitLabel: "Submit",
99
}

site/src/pages/UsersPage/CreateUserPage/CreateUserPage.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import { CreateUserRequest } from "../../../api/typesGenerated"
66
import { CreateUserForm } from "../../../components/CreateUserForm/CreateUserForm"
77
import { XServiceContext } from "../../../xServices/StateContext"
88

9-
const Language = {
9+
export const Language = {
1010
unknownError: "Oops, an unknown error occurred.",
1111
}
1212

0 commit comments

Comments
 (0)