File tree Expand file tree Collapse file tree 2 files changed +3
-12
lines changed
site/src/pages/GroupsPage Expand file tree Collapse file tree 2 files changed +3
-12
lines changed Original file line number Diff line number Diff line change @@ -3,15 +3,13 @@ import { Helmet } from "react-helmet-async";
3
3
import { useMutation , useQueryClient } from "react-query" ;
4
4
import { useNavigate } from "react-router-dom" ;
5
5
import { createGroup } from "api/queries/groups" ;
6
- import { useDashboard } from "modules/dashboard/useDashboard" ;
7
6
import { pageTitle } from "utils/page" ;
8
7
import CreateGroupPageView from "./CreateGroupPageView" ;
9
8
10
9
export const CreateGroupPage : FC = ( ) => {
11
10
const queryClient = useQueryClient ( ) ;
12
11
const navigate = useNavigate ( ) ;
13
12
const createGroupMutation = useMutation ( createGroup ( queryClient , "default" ) ) ;
14
- const { experiments } = useDashboard ( ) ;
15
13
16
14
return (
17
15
< >
@@ -21,13 +19,7 @@ export const CreateGroupPage: FC = () => {
21
19
< CreateGroupPageView
22
20
onSubmit = { async ( data ) => {
23
21
const newGroup = await createGroupMutation . mutateAsync ( data ) ;
24
-
25
- let groupURL = `/groups/${ newGroup . name } ` ;
26
- if ( experiments . includes ( "multi-organization" ) ) {
27
- groupURL = `/organizations/${ newGroup . organization_id } /groups/${ newGroup . name } ` ;
28
- }
29
-
30
- navigate ( groupURL ) ;
22
+ navigate ( `/groups/${ newGroup . name } ` ) ;
31
23
} }
32
24
error = { createGroupMutation . error }
33
25
isLoading = { createGroupMutation . isLoading }
Original file line number Diff line number Diff line change @@ -54,8 +54,7 @@ import { isEveryoneGroup } from "utils/groups";
54
54
import { pageTitle } from "utils/page" ;
55
55
56
56
export const GroupPage : FC = ( ) => {
57
- const { groupName, organization } = useParams ( ) as {
58
- organization : string ;
57
+ const { groupName } = useParams ( ) as {
59
58
groupName : string ;
60
59
} ;
61
60
const queryClient = useQueryClient ( ) ;
@@ -64,7 +63,7 @@ export const GroupPage: FC = () => {
64
63
// is /groups/:groupName, which does not include the organization. So the orgID cannot
65
64
// be inferred from the URL. The organization is only included in the url when the multi-org
66
65
// experiment is enabled.
67
- const groupQuery = useQuery ( group ( organization ?? "default" , groupName ) ) ;
66
+ const groupQuery = useQuery ( group ( "default" , groupName ) ) ;
68
67
const groupData = groupQuery . data ;
69
68
const { data : permissions } = useQuery (
70
69
groupData !== undefined
You can’t perform that action at this time.
0 commit comments