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

Commit ded87ac

Browse files
feat: avoid dashboard flickering
fix: missing redirect info
1 parent 2e8066d commit ded87ac

File tree

2 files changed

+16
-4
lines changed

2 files changed

+16
-4
lines changed

studio/src/app/pages/core/app-signin/app-signin-page.tsx

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import {Component, Fragment, h, State} from '@stencil/core';
1+
import {Component, Fragment, h, Prop, State} from '@stencil/core';
22

33
import {AuthUser} from '../../../models/auth/auth.user';
44

@@ -8,14 +8,22 @@ import authStore from '../../../stores/auth.store';
88
tag: 'app-signin-page',
99
})
1010
export class AppSigninPage {
11+
@Prop()
12+
redirect: string;
13+
14+
@Prop()
15+
redirectId: string;
16+
1117
@State()
1218
private signin: boolean;
1319

1420
private destroyListener;
1521

1622
async componentWillLoad() {
17-
this.destroyListener = authStore.onChange('authUser', async (_authUser: AuthUser | null) => {
18-
await this.initSignedIn();
23+
this.destroyListener = authStore.onChange('authUser', async (authUser: AuthUser | null) => {
24+
if (!authUser) {
25+
this.signin = true;
26+
}
1927
});
2028

2129
await this.initSignedIn();
@@ -37,7 +45,7 @@ export class AppSigninPage {
3745
<Fragment>
3846
<app-navigation></app-navigation>
3947
<ion-content class="ion-padding fullscreen-padding">
40-
<app-signin></app-signin>
48+
<app-signin redirect={this.redirect} redirectId={this.redirectId}></app-signin>
4149
</ion-content>
4250
</Fragment>
4351
);

studio/src/components.d.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -344,6 +344,8 @@ export namespace Components {
344344
"redirectId": string;
345345
}
346346
interface AppSigninPage {
347+
"redirect": string;
348+
"redirectId": string;
347349
}
348350
interface AppSlideNavigate {
349351
}
@@ -1482,6 +1484,8 @@ declare namespace LocalJSX {
14821484
"redirectId"?: string;
14831485
}
14841486
interface AppSigninPage {
1487+
"redirect"?: string;
1488+
"redirectId"?: string;
14851489
}
14861490
interface AppSlideNavigate {
14871491
"onReorder"?: (event: CustomEvent<ItemReorderEventDetail>) => void;

0 commit comments

Comments
 (0)