Skip to content

Commit

Permalink
Fix toast notification implementation
Browse files Browse the repository at this point in the history
  • Loading branch information
openhands-agent committed Dec 6, 2024
1 parent fca27e4 commit 4afb987
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/components/TodoList.vue
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@
<script>
import { mapState, mapActions } from 'vuex';
import TodoItem from './TodoItem.vue';
import { useToast } from 'vue-toastification';
export default {
name: 'TodoList',
Expand All @@ -59,7 +60,8 @@ export default {
confirmationMessage: '',
actionType: '', // 'delete', 'clear', or 'deleteSubtask'
parentId: null,
subtaskId: null
subtaskId: null,
toast: useToast()
}
},
computed: {
Expand Down Expand Up @@ -87,8 +89,7 @@ export default {
this.saveTodos();
} catch (error) {
if (error.message === 'Item already exists') {
this.$toast.error('Item already exists', {
position: 'top-right',
this.toast.error('Item already exists', {
timeout: 3000
});
}
Expand All @@ -103,8 +104,7 @@ export default {
this.saveTodos();
} catch (error) {
if (error.message === 'Item already exists') {
this.$toast.error('Item already exists', {
position: 'top-right',
this.toast.error('Item already exists', {
timeout: 3000
});
}
Expand Down

0 comments on commit 4afb987

Please sign in to comment.