Created
April 14, 2022 17:59
Revisions
-
Iheanacho-ai revised this gist
Apr 14, 2022 . 1 changed file with 0 additions and 7 deletions.There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -8,8 +8,6 @@ </template> <script> import { sdk } from "../../utils"; export default { name: 'Notification', @@ -18,11 +16,6 @@ orderStatus: "" } }, mounted(){ if(sdk.account.get !== null){ try { -
Iheanacho-ai created this gist
Apr 14, 2022 .There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,54 @@ <template> <div class="notifications rounded overflow-hidden shadow-lg"> <div class="order-container"> <h2>{{orderStatus}}</h2> </div> </div> </template> <script> import { sdk } from "../../utils"; import { createToast } from 'mosha-vue-toastify'; import 'mosha-vue-toastify/dist/style.css' export default { name: 'Notification', data(){ return{ orderStatus: "" } }, watch: { orderStatus: function(){ createToast(this.orderStatus) } }, mounted(){ if(sdk.account.get !== null){ try { sdk.subscribe('collections.62532d2523f63b230a93.documents', response => { console.log(response.payload.orderStatus, 'order status payload' ) this.orderStatus = response.payload.orderStatus }); } catch (error) { console.log(error, 'error') } } } } </script> <style scoped> .notifications{ width: 350px; height: 100px; display: flex; justify-content: center; align-items: center; } </style>