Skip to content

Commit

Permalink
update results
Browse files Browse the repository at this point in the history
  • Loading branch information
codeBelt committed Jan 23, 2021
1 parent 7de9390 commit 196de28
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 8 deletions.
4 changes: 2 additions & 2 deletions src/components/pages/about-page/AboutPage.store.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,9 @@ export class AboutPageStore {
const response: ApiResponse<null> = yield getErrorRequest();

this.errorExampleResults = {
...this.errorExampleResults,
...response,
data: this.errorExampleResults.data,
isRequesting: false,
...response, // Overwrites the default data prop or adds an error. Also adds the statusCode.
};

if (response.error) {
Expand Down
8 changes: 4 additions & 4 deletions src/components/pages/index-page/IndexPage.store.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,19 +36,19 @@ export const IndexPageStore = () =>
const response: ApiResponse<IShow> = yield getShowRequest(defaultShowId);

this.showResults = {
...this.showResults,
...response,
data: this.showResults.data,
isRequesting: false,
...response, // Overwrites the default data prop or adds an error. Also adds the statusCode.
};
},

*loadCasts() {
const response: ApiResponse<ICast[]> = yield getCastsRequest(defaultShowId);

this.castsResults = {
...this.castsResults,
...response,
data: this.castsResults.data,
isRequesting: false,
...response, // Overwrites the default data prop or adds an error. Also adds the statusCode.
};
},
});
Expand Down
4 changes: 2 additions & 2 deletions src/stores/auth/AuthGlobalStore.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,9 @@ export const AuthGlobalStore = (globalStore: GlobalStore) =>
const response: ApiResponse<IUserResponse> = yield getUserRequest();

this.authResults = {
...this.authResults,
...response,
data: this.authResults.data,
isRequesting: false,
...response, // Overwrites the default data prop or adds an error. Also adds the statusCode.
};

if (this.user) {
Expand Down

1 comment on commit 196de28

@vercel
Copy link

@vercel vercel bot commented on 196de28 Jan 23, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.