File tree Expand file tree Collapse file tree 5 files changed +23
-11
lines changed
pages/ManagementSettingsPage Expand file tree Collapse file tree 5 files changed +23
-11
lines changed Original file line number Diff line number Diff line change @@ -52,7 +52,7 @@ export const Alert: FC<AlertProps> = ({
52
52
size = "small"
53
53
onClick = { ( ) => {
54
54
setOpen ( false ) ;
55
- onDismiss && onDismiss ( ) ;
55
+ onDismiss ?. ( ) ;
56
56
} }
57
57
data-testid = "dismiss-banner-btn"
58
58
>
Original file line number Diff line number Diff line change @@ -6,6 +6,7 @@ import { ErrorAlert } from "components/Alert/ErrorAlert";
6
6
import { displaySuccess } from "components/GlobalSnackbar/utils" ;
7
7
import { Stack } from "components/Stack/Stack" ;
8
8
import { CreateOrganizationPageView } from "./CreateOrganizationPageView" ;
9
+ import { isApiValidationError } from "api/errors" ;
9
10
10
11
const CreateOrganizationPage : FC = ( ) => {
11
12
const navigate = useNavigate ( ) ;
@@ -19,13 +20,15 @@ const CreateOrganizationPage: FC = () => {
19
20
20
21
return (
21
22
< Stack >
22
- { Boolean ( error ) && < ErrorAlert error = { error } /> }
23
+ { Boolean ( error ) && ! isApiValidationError ( error ) && (
24
+ < ErrorAlert error = { error } />
25
+ ) }
23
26
24
27
< CreateOrganizationPageView
25
28
error = { error }
26
29
onSubmit = { async ( values ) => {
27
30
await createOrganizationMutation . mutateAsync ( values ) ;
28
- displaySuccess ( "Organization settings updated ." ) ;
31
+ displaySuccess ( "Organization created ." ) ;
29
32
navigate ( `/organizations/${ values . name } ` ) ;
30
33
} }
31
34
/>
Original file line number Diff line number Diff line change @@ -5,11 +5,13 @@ import {
5
5
updateOrganization ,
6
6
deleteOrganization ,
7
7
} from "api/queries/organizations" ;
8
+ import { isApiValidationError } from "api/errors" ;
8
9
import { ErrorAlert } from "components/Alert/ErrorAlert" ;
9
10
import { displaySuccess } from "components/GlobalSnackbar/utils" ;
10
11
import { Stack } from "components/Stack/Stack" ;
11
12
import { useOrganizationSettings } from "./ManagementSettingsLayout" ;
12
13
import { OrganizationSettingsPageView } from "./OrganizationSettingsPageView" ;
14
+ import { EmptyState } from "components/EmptyState/EmptyState" ;
13
15
14
16
const OrganizationSettingsPage : FC = ( ) => {
15
17
const navigate = useNavigate ( ) ;
@@ -29,17 +31,15 @@ const OrganizationSettingsPage: FC = () => {
29
31
const error =
30
32
updateOrganizationMutation . error ?? deleteOrganizationMutation . error ;
31
33
32
- if ( ! currentOrganizationId ) {
33
- return null ;
34
- }
35
-
36
- if ( ! org ) {
37
- return null ;
34
+ if ( ! currentOrganizationId || ! org ) {
35
+ return < EmptyState message = "Organization not found" /> ;
38
36
}
39
37
40
38
return (
41
39
< Stack >
42
- { Boolean ( error ) && < ErrorAlert error = { error } /> }
40
+ { Boolean ( error ) && ! isApiValidationError ( error ) && (
41
+ < ErrorAlert error = { error } />
42
+ ) }
43
43
44
44
< OrganizationSettingsPageView
45
45
organization = { org }
Original file line number Diff line number Diff line change @@ -56,7 +56,9 @@ const DeploymentSettingsNavigation: FC = () => {
56
56
< SidebarNavItem
57
57
active = { active }
58
58
href = "/deployment/general"
59
- icon = { < SettingsIcon css = { { width : 16 , height : 16 } } /> }
59
+ // 24px matches the width of the organization icons, and the component is smart enough
60
+ // to keep the icon itself square. It looks too big if it's 24x24.
61
+ icon = { < SettingsIcon css = { { width : 24 , height : 20 } } /> }
60
62
>
61
63
Deployment
62
64
</ SidebarNavItem >
Original file line number Diff line number Diff line change @@ -46,6 +46,13 @@ export const components = {
46
46
::placeholder {
47
47
color: ${ theme . palette . text . disabled } ;
48
48
}
49
+
50
+ fieldset {
51
+ border: unset;
52
+ padding: 0;
53
+ margin: 0;
54
+ width: 100%;
55
+ }
49
56
` ,
50
57
} ,
51
58
MuiAvatar : {
You can’t perform that action at this time.
0 commit comments