diff --git a/apps/web/src/app/tools/send/send-access/access.component.ts b/apps/web/src/app/tools/send/send-access/access.component.ts index e1e39078f36..c5f5dae2621 100644 --- a/apps/web/src/app/tools/send/send-access/access.component.ts +++ b/apps/web/src/app/tools/send/send-access/access.component.ts @@ -28,7 +28,7 @@ type SendViewState = (typeof SendViewState)[keyof typeof SendViewState]; changeDetection: ChangeDetectionStrategy.OnPush, }) export class AccessComponent implements OnInit { - readonly viewState = signal(SendViewState.Auth); + readonly viewState = signal(SendViewState.Auth); id: string; key: string; @@ -45,6 +45,18 @@ export class AccessComponent implements OnInit { this.route.params.pipe(takeUntilDestroyed(this.destroyRef)).subscribe((params) => { this.id = params.sendId; this.key = params.key; + + // when pasting sequential Send URLs into the browser, + // Angular reuses the SendAuthComponent instance + // Reset state so child components are recreated with fresh data + this.sendAccessResponse = null; + this.sendAccessToken = null; + this.sendAccessRequest = new SendAccessRequest(); + + // Temporarily set viewState to null to destroy the current child component, + // then set it back to Auth on the next tick to recreate it with the new id/key. + this.viewState.set(null); + setTimeout(() => this.viewState.set(SendViewState.Auth)); }); }