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

Commit599ad91

Browse files
committed
fixup! Throw error if no default org
1 parent4a7c9d9 commit599ad91

File tree

2 files changed

+8
-2
lines changed

2 files changed

+8
-2
lines changed

‎site/src/pages/ManagementSettingsPage/GroupsPage/GroupsPage.tsx

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ import { getErrorMessage } from "api/errors";
88
import{groups}from"api/queries/groups";
99
import{organizationPermissions}from"api/queries/organizations";
1010
importtype{Organization}from"api/typesGenerated";
11+
import{EmptyState}from"components/EmptyState/EmptyState";
1112
import{displayError}from"components/GlobalSnackbar/utils";
1213
import{Loader}from"components/Loader/Loader";
1314
import{PageHeader,PageHeaderTitle}from"components/PageHeader/PageHeader";
@@ -56,7 +57,11 @@ export const GroupsPage: FC = () => {
5657
return<Navigateto={`/organizations/${defaultName}/groups`}replace/>;
5758
}
5859
// We expect there to always be a default organization.
59-
thrownewError("No default organization found")
60+
thrownewError("No default organization found");
61+
}
62+
63+
if(!organization){
64+
return<EmptyStatemessage="Organization not found"/>;
6065
}
6166

6267
constpermissions=permissionsQuery.data;

‎site/src/pages/ManagementSettingsPage/OrganizationSettingsPage.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,8 @@ const OrganizationSettingsPage: FC = () => {
4747
if(defaultOrg){
4848
return<Navigateto={`/organizations/${defaultOrg.name}`}replace/>;
4949
}
50-
return<EmptyStatemessage="No default organization found"/>;
50+
// We expect there to always be a default organization.
51+
thrownewError("No default organization found");
5152
}
5253

5354
if(!organization){

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp