mirror of
https://github.com/harivansh-afk/sandbox-agent.git
synced 2026-04-20 20:01:13 +00:00
Fix organization settings route hooks
This commit is contained in:
parent
5e0516ff68
commit
859ad13934
1 changed files with 3 additions and 3 deletions
|
|
@ -185,6 +185,7 @@ function OrganizationsRoute() {
|
||||||
}
|
}
|
||||||
|
|
||||||
function OrganizationSettingsRoute() {
|
function OrganizationSettingsRoute() {
|
||||||
|
const { organizationId } = organizationSettingsRoute.useParams();
|
||||||
const snapshot = useMockAppSnapshot();
|
const snapshot = useMockAppSnapshot();
|
||||||
if (!isMockFrontendClient && isAppSnapshotBootstrapping(snapshot)) {
|
if (!isMockFrontendClient && isAppSnapshotBootstrapping(snapshot)) {
|
||||||
return <AppLoadingScreen label="Loading organization settings..." />;
|
return <AppLoadingScreen label="Loading organization settings..." />;
|
||||||
|
|
@ -193,7 +194,6 @@ function OrganizationSettingsRoute() {
|
||||||
return <Navigate to="/signin" replace />;
|
return <Navigate to="/signin" replace />;
|
||||||
}
|
}
|
||||||
|
|
||||||
const { organizationId } = organizationSettingsRoute.useParams();
|
|
||||||
const organization = getMockOrganizationById(snapshot, organizationId);
|
const organization = getMockOrganizationById(snapshot, organizationId);
|
||||||
if (!organization) {
|
if (!organization) {
|
||||||
return <Navigate to="/organizations" replace />;
|
return <Navigate to="/organizations" replace />;
|
||||||
|
|
@ -203,6 +203,7 @@ function OrganizationSettingsRoute() {
|
||||||
}
|
}
|
||||||
|
|
||||||
function OrganizationBillingRoute() {
|
function OrganizationBillingRoute() {
|
||||||
|
const { organizationId } = organizationBillingRoute.useParams();
|
||||||
const snapshot = useMockAppSnapshot();
|
const snapshot = useMockAppSnapshot();
|
||||||
if (!isMockFrontendClient && isAppSnapshotBootstrapping(snapshot)) {
|
if (!isMockFrontendClient && isAppSnapshotBootstrapping(snapshot)) {
|
||||||
return <AppLoadingScreen label="Loading billing..." />;
|
return <AppLoadingScreen label="Loading billing..." />;
|
||||||
|
|
@ -211,7 +212,6 @@ function OrganizationBillingRoute() {
|
||||||
return <Navigate to="/signin" replace />;
|
return <Navigate to="/signin" replace />;
|
||||||
}
|
}
|
||||||
|
|
||||||
const { organizationId } = organizationBillingRoute.useParams();
|
|
||||||
const organization = getMockOrganizationById(snapshot, organizationId);
|
const organization = getMockOrganizationById(snapshot, organizationId);
|
||||||
if (!organization) {
|
if (!organization) {
|
||||||
return <Navigate to="/organizations" replace />;
|
return <Navigate to="/organizations" replace />;
|
||||||
|
|
@ -221,6 +221,7 @@ function OrganizationBillingRoute() {
|
||||||
}
|
}
|
||||||
|
|
||||||
function OrganizationCheckoutRoute() {
|
function OrganizationCheckoutRoute() {
|
||||||
|
const { organizationId, planId } = organizationCheckoutRoute.useParams();
|
||||||
const snapshot = useMockAppSnapshot();
|
const snapshot = useMockAppSnapshot();
|
||||||
if (!isMockFrontendClient && isAppSnapshotBootstrapping(snapshot)) {
|
if (!isMockFrontendClient && isAppSnapshotBootstrapping(snapshot)) {
|
||||||
return <AppLoadingScreen label="Loading checkout..." />;
|
return <AppLoadingScreen label="Loading checkout..." />;
|
||||||
|
|
@ -229,7 +230,6 @@ function OrganizationCheckoutRoute() {
|
||||||
return <Navigate to="/signin" replace />;
|
return <Navigate to="/signin" replace />;
|
||||||
}
|
}
|
||||||
|
|
||||||
const { organizationId, planId } = organizationCheckoutRoute.useParams();
|
|
||||||
const organization = getMockOrganizationById(snapshot, organizationId);
|
const organization = getMockOrganizationById(snapshot, organizationId);
|
||||||
if (!organization) {
|
if (!organization) {
|
||||||
return <Navigate to="/organizations" replace />;
|
return <Navigate to="/organizations" replace />;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue