aboutsummaryrefslogtreecommitdiff
path: root/src/components/subscribe_button
diff options
context:
space:
mode:
Diffstat (limited to 'src/components/subscribe_button')
-rw-r--r--src/components/subscribe_button/subscribe_button.js26
-rw-r--r--src/components/subscribe_button/subscribe_button.vue22
2 files changed, 0 insertions, 48 deletions
diff --git a/src/components/subscribe_button/subscribe_button.js b/src/components/subscribe_button/subscribe_button.js
deleted file mode 100644
index e3a2842c..00000000
--- a/src/components/subscribe_button/subscribe_button.js
+++ /dev/null
@@ -1,26 +0,0 @@
-export default {
- props: [ 'user' ],
- data () {
- return {
- inProgress: false
- }
- },
- methods: {
- subscribe () {
- this.inProgress = true
- this.$store.state.api.backendInteractor.subscribeUser(this.user.id)
- .then((updated) => {
- console.log(updated)
- this.inProgress = false
- })
- },
- unsubscribe () {
- this.inProgress = true
- this.$store.state.api.backendInteractor.unsubscribeUser(this.user.id)
- .then((updated) => {
- console.log(updated)
- this.inProgress = false
- })
- }
- }
-}
diff --git a/src/components/subscribe_button/subscribe_button.vue b/src/components/subscribe_button/subscribe_button.vue
deleted file mode 100644
index f7dd8c61..00000000
--- a/src/components/subscribe_button/subscribe_button.vue
+++ /dev/null
@@ -1,22 +0,0 @@
-<template>
- <div>
- <button
- @click.prevent="subscribe"
- class="btn btn-default follow-card-follow-button"
- :disabled="inProgress"
- v-if="!user.subscribing"
- >
- Subscribe
- </button>
- <button
- @click.prevent="unsubscribe"
- class="btn btn-default follow-card-follow-button pressed"
- :disabled="inProgress"
- v-else
- >
- Subscribing!
- </button>
- </div>
-</template>
-
-<script src="./subscribe_button.js"></script>