Skip to content
This repository was archived by the owner on Feb 6, 2024. It is now read-only.

Commit 037c0cc

Browse files
fix: unload of editor should always be called when navigating away from it
1 parent 87c0cf8 commit 037c0cc

File tree

3 files changed

+3
-10
lines changed

3 files changed

+3
-10
lines changed

studio/src/app/components/core/app-menu-user/app-menu-user.tsx

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -146,13 +146,6 @@ export class AppMenuUser {
146146
});
147147
}
148148

149-
private navigateNewDeck() {
150-
this.navService.navigate({
151-
url: '/editor',
152-
direction: NavDirection.ROOT
153-
})
154-
}
155-
156149
private async filterDecksOnChange(e: CustomEvent) {
157150
if (e && e.detail) {
158151
await this.filterDecks(e.detail.value);
@@ -213,7 +206,7 @@ export class AppMenuUser {
213206

214207
<ion-item-divider>
215208
<ion-label>Presentations</ion-label>
216-
<ion-button size="small" slot="end" shape="round" onClick={() => this.navigateNewDeck()} class="new ion-margin-end">
209+
<ion-button size="small" slot="end" shape="round" href="/editor" routerDirection="root" class="new ion-margin-end">
217210
<ion-icon name="book" slot="start"></ion-icon>
218211
<ion-label>New</ion-label>
219212
</ion-button>

studio/src/app/components/core/app-navigation-actions/app-navigation-actions.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ export class AppNavigationActions {
9797

9898
private renderPresentationButton() {
9999
if (this.presentation) {
100-
return <ion-button class="presentation ion-padding-end" shape="round" href="/editor" routerDirection="forward">
100+
return <ion-button class="presentation ion-padding-end" shape="round" href="/editor" routerDirection="root">
101101
<ion-label class="ion-text-uppercase">Write a presentation</ion-label>
102102
</ion-button>;
103103
} else {

studio/src/components.d.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,9 @@
88
import '@stencil/core';
99

1010
import '@ionic/core';
11-
import 'ionicons';
1211
import 'deckdeckgo';
1312
import 'deckdeckgo-inline-editor';
13+
import 'ionicons';
1414
import {
1515
EventEmitter,
1616
} from '@stencil/core';

0 commit comments

Comments
 (0)