Skip to content

Commit e872b9e

Browse files
committed
Clean up lint issues
1 parent 538bfba commit e872b9e

File tree

3 files changed

+7
-26
lines changed

3 files changed

+7
-26
lines changed

site/components/Form/FormDropdownField.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ export interface FormDropdownFieldProps<T> extends FormTextFieldProps<T> {
1919
export const formDropdownFieldFactory = <T,>(): React.FC<FormDropdownFieldProps<T>> => {
2020
const FormTextField = formTextFieldFactory<T>()
2121

22-
const component: React.FC<FormDropdownFieldProps<T>> = ({ items, ...props }) => {
22+
const Component: React.FC<FormDropdownFieldProps<T>> = ({ items, ...props }) => {
2323
const styles = useStyles()
2424
return (
2525
<FormTextField select {...props}>
@@ -44,8 +44,8 @@ export const formDropdownFieldFactory = <T,>(): React.FC<FormDropdownFieldProps<
4444
}
4545

4646
// Required when using an anonymous factory function
47-
component.displayName = "FormDropdownField"
48-
return component
47+
Component.displayName = "FormDropdownField"
48+
return Component
4949
}
5050

5151
const useStyles = makeStyles({

site/components/Form/types.ts

Lines changed: 0 additions & 16 deletions
This file was deleted.

site/forms/CreateProjectForm.tsx

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -76,15 +76,15 @@ export const CreateProjectForm: React.FC<CreateProjectFormProps> = ({
7676
fullWidth
7777
helperText="A unique name describing your project."
7878
label="Project Name"
79-
placeholder={"my-project"}
79+
placeholder="my-project"
8080
required
8181
/>
8282
</FormSection>
8383

8484
<FormSection title="Organization">
8585
<FormDropdownField
8686
form={form}
87-
formFieldName={"organizationId"}
87+
formFieldName="organizationId"
8888
helperText="The organization owning this project."
8989
items={organizationDropDownItems}
9090
fullWidth
@@ -96,7 +96,7 @@ export const CreateProjectForm: React.FC<CreateProjectFormProps> = ({
9696
<FormSection title="Provider">
9797
<FormDropdownField
9898
form={form}
99-
formFieldName={"provisioner"}
99+
formFieldName="provisioner"
100100
helperText="The backing provisioner for this project."
101101
items={provisionerDropDownItems}
102102
fullWidth
@@ -112,10 +112,7 @@ export const CreateProjectForm: React.FC<CreateProjectFormProps> = ({
112112
<LoadingButton
113113
loading={form.isSubmitting}
114114
className={styles.button}
115-
onClick={() => {
116-
console.log("submit clicked: " + JSON.stringify(form.values))
117-
form.submitForm()
118-
}}
115+
onClick={form.submitForm}
119116
variant="contained"
120117
color="primary"
121118
type="submit"

0 commit comments

Comments
 (0)