Skip to content

Commit

Permalink
remove runInAction from enqueueToast
Browse files Browse the repository at this point in the history
  • Loading branch information
codeBelt committed Jan 23, 2021
1 parent 5d91f55 commit b3d9515
Showing 1 changed file with 6 additions and 8 deletions.
14 changes: 6 additions & 8 deletions src/stores/toast/ToastGlobalStore.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,12 @@ export const ToastGlobalStore = (globalStore: GlobalStore) =>
enqueueToast(message: string, variantType: VariantType) {
const keyId = new Date().toString();

runInAction(() => {
this.notifications.push({
message,
options: {
key: keyId,
variant: variantType as VariantType,
},
});
this.notifications.push({
message,
options: {
key: keyId,
variant: variantType as VariantType,
},
});
},

Expand Down

1 comment on commit b3d9515

@vercel
Copy link

@vercel vercel bot commented on b3d9515 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.