Skip to content

Commit

Permalink
refactor(create-track): auto navigate back after creating a track
Browse files Browse the repository at this point in the history
  • Loading branch information
Mathieu Hermann committed Nov 14, 2024
1 parent 850ddaf commit ff617ea
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/app/pages/create-track/create-track.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -55,8 +55,8 @@ export class CreateTrackComponent extends Destroyable {
this.trackService
.addTrack$(this.generatedTrack()!)
.pipe(
tap(() => this.resetComputed()),
tap(trackNumber => localStorage.setItem(RideLocalComponent.TRACK_KEY, `${trackNumber}`)),
tap(() => this.goBack()),
takeUntil(this.destroyed$)
)
.subscribe();
Expand All @@ -78,6 +78,5 @@ export class CreateTrackComponent extends Destroyable {

private resetComputed(): void {
this.generatedTrack.set(undefined);
// this.trackAlreadyUse.set(true);
}
}

0 comments on commit ff617ea

Please sign in to comment.