Skip to content

Commit

Permalink
Fix: Change org ID to org slug
Browse files Browse the repository at this point in the history
  • Loading branch information
DanielHougaard committed Mar 6, 2024
1 parent 069be5a commit 3132cf8
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 6 deletions.
2 changes: 1 addition & 1 deletion frontend/src/layouts/AppLayout/AppLayout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -225,7 +225,7 @@ export const AppLayout = ({ children }: LayoutProps) => {
project: { id: newProjectId }
}
} = await createWs.mutateAsync({
organizationId: currentOrg.id,
organizationSlug: currentOrg.slug,
projectName: name
});

Expand Down
12 changes: 7 additions & 5 deletions frontend/src/pages/org/[id]/overview/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ import {
import {
OrgPermissionActions,
OrgPermissionSubjects,
useOrganization,
useSubscription,
useUser,
useWorkspace
Expand Down Expand Up @@ -468,8 +469,9 @@ const OrganizationPage = withPermission(
const router = useRouter();

const { workspaces, isLoading: isWorkspaceLoading } = useWorkspace();
const currentOrg = String(router.query.id);
const orgWorkspaces = workspaces?.filter((workspace) => workspace.orgId === currentOrg) || [];
const { currentOrg } = useOrganization();
const routerOrgId = String(router.query.id);
const orgWorkspaces = workspaces?.filter((workspace) => workspace.orgId === routerOrgId) || [];
const { createNotification } = useNotificationContext();
const addUsersToProject = useAddUserToWsNonE2EE();

Expand Down Expand Up @@ -505,12 +507,12 @@ const OrganizationPage = withPermission(
project: { id: newProjectId }
}
} = await createWs.mutateAsync({
organizationId: currentOrg,
organizationSlug: currentOrg.slug,
projectName: name
});

if (addMembers) {
const orgUsers = await fetchOrgUsers(currentOrg);
const orgUsers = await fetchOrgUsers(currentOrg.id);

await addUsersToProject.mutateAsync({
emails: orgUsers
Expand Down Expand Up @@ -540,7 +542,7 @@ const OrganizationPage = withPermission(

useEffect(() => {
onboardingCheck({
orgId: currentOrg,
orgId: routerOrgId,
setHasUserClickedIntro,
setHasUserClickedSlack,
setHasUserPushedSecrets,
Expand Down

0 comments on commit 3132cf8

Please sign in to comment.