@@ -2,37 +2,26 @@ import type { Interpolation, Theme } from "@emotion/react";
2
2
import Button from "@mui/material/Button" ;
3
3
import TextField from "@mui/material/TextField" ;
4
4
import { useFormik } from "formik" ;
5
- import { type FC , useState } from "react" ;
6
- import { useMutation , useQueryClient } from "react-query" ;
5
+ import type { FC } from "react" ;
7
6
import * as Yup from "yup" ;
8
- import {
9
- createOrganization ,
10
- updateOrganization ,
11
- deleteOrganization ,
12
- } from "api/queries/organizations" ;
13
7
import type {
14
8
Organization ,
15
9
UpdateOrganizationRequest ,
16
10
} from "api/typesGenerated" ;
17
- import { ErrorAlert } from "components/Alert/ErrorAlert" ;
18
11
import {
19
12
FormFields ,
20
13
FormSection ,
21
14
HorizontalForm ,
22
15
FormFooter ,
23
16
} from "components/Form/Form" ;
24
- import { displaySuccess } from "components/GlobalSnackbar/utils" ;
25
17
import { IconField } from "components/IconField/IconField" ;
26
- import { Margins } from "components/Margins/Margins" ;
27
18
import { PageHeader , PageHeaderTitle } from "components/PageHeader/PageHeader" ;
28
- import { Stack } from "components/Stack/Stack" ;
29
19
import {
30
20
getFormHelpers ,
31
21
nameValidator ,
32
22
displayNameValidator ,
33
23
onChangeTrimmed ,
34
24
} from "utils/formUtils" ;
35
- import { useOrganizationSettings } from "./ManagementSettingsLayout" ;
36
25
37
26
const MAX_DESCRIPTION_CHAR_LIMIT = 128 ;
38
27
const MAX_DESCRIPTION_MESSAGE = `Please enter a description that is no longer than ${ MAX_DESCRIPTION_CHAR_LIMIT } characters.` ;
@@ -51,13 +40,12 @@ interface OrganizationSettingsPageViewProps {
51
40
error : unknown ;
52
41
onSubmit : ( values : UpdateOrganizationRequest ) => Promise < void > ;
53
42
54
- onCreateOrg : ( name : string ) => void ;
55
43
onDeleteOrg : ( ) => void ;
56
44
}
57
45
58
46
export const OrganizationSettingsPageView : FC <
59
47
OrganizationSettingsPageViewProps
60
- > = ( { org, error, onSubmit, onCreateOrg , onDeleteOrg } ) => {
48
+ > = ( { org, error, onSubmit, onDeleteOrg } ) => {
61
49
const form = useFormik < UpdateOrganizationRequest > ( {
62
50
initialValues : {
63
51
name : org . name ,
@@ -71,8 +59,6 @@ export const OrganizationSettingsPageView: FC<
71
59
} ) ;
72
60
const getFieldHelpers = getFormHelpers ( form , error ) ;
73
61
74
- const [ newOrgName , setNewOrgName ] = useState ( "" ) ;
75
-
76
62
return (
77
63
< div >
78
64
< PageHeader >
@@ -132,16 +118,6 @@ export const OrganizationSettingsPageView: FC<
132
118
Delete this organization
133
119
</ Button >
134
120
) }
135
-
136
- < Stack css = { { marginTop : 128 } } >
137
- < TextField
138
- label = "New organization name"
139
- onChange = { ( event ) => setNewOrgName ( event . target . value ) }
140
- />
141
- < Button onClick = { ( ) => onCreateOrg ( newOrgName ) } >
142
- Create new organization
143
- </ Button >
144
- </ Stack >
145
121
</ div >
146
122
) ;
147
123
} ;
0 commit comments