update paddle view nav

This commit is contained in:
2025-12-01 04:44:47 +00:00
parent ff1387df9f
commit f54588e877
3 changed files with 38 additions and 30 deletions
@@ -100,8 +100,12 @@ export class SubscriptionView extends DeesElement {
<h3>Paddle</h3>
<dees-button @click=${async () => {
await this.domtoolsPromise;
this.domtools.router.pushUrl(`/org/${state.accountState.getState().selectedOrg.data.slug}/paddlesetup`)
// Extract org slug from current URL: /account/org/{orgSlug}/billing
const pathParts = window.location.pathname.split('/');
const orgSlug = pathParts[3];
// Use parent's subrouter for proper navigation within account section
const parentElement = (this.getRootNode() as any).host;
parentElement.subrouter.pushUrl(`/org/${orgSlug}/paddlesetup`);
}}>Set up Paddle.com</dees-button>
<h3>Enterprise Billing</h3>