Skip to content
This repository has been archived by the owner on Sep 7, 2020. It is now read-only.

Commit

Permalink
Add removing inviteData from localstoragee
Browse files Browse the repository at this point in the history
  • Loading branch information
Pavel Kokovin committed Apr 24, 2019
1 parent 15e8e0e commit b6c6a25
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
5 changes: 4 additions & 1 deletion source/modules/invite/Invite.vue
Original file line number Diff line number Diff line change
Expand Up @@ -37,9 +37,12 @@ export default Vue.extend({
return this.$route.params.inviteId;
},
},
mounted() {
this.initSate();
},
methods: {
...mapActions(['fetchPermissions', 'fetchVendors']),
...mapActions('Invite', ['accept']),
...mapActions('Invite', ['initSate', 'accept']),
},
watch: {
hasAccepted(val) {
Expand Down
3 changes: 3 additions & 0 deletions source/modules/invite/store.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@ export default function HistoryStore(apiUrl: string) {
};
const getters: GetterTree<State, any> = {};
const actions: ActionTree<State, any> = {
initState() {
localStorage.removeItem('inviteData');
},
async accept({ commit }, { inviteId, vendorId }) {
await axios
.put(`${apiUrl}/vendors/${vendorId}/memberships/invites/${inviteId}`, {
Expand Down

0 comments on commit b6c6a25

Please sign in to comment.