refactor: remove vue-rx dependency

This commit is contained in:
Andrew Bastin
2021-08-12 13:44:10 +05:30
parent 971b35a252
commit c273ded97d
24 changed files with 238 additions and 234 deletions

View File

@@ -166,19 +166,27 @@
</template>
<script>
import { defineComponent } from "@nuxtjs/composition-api"
import { currentUser$ } from "~/helpers/fb/auth"
import * as teamUtils from "~/helpers/teams/utils"
import { useReadonlyStream } from "~/helpers/utils/composables"
import {
restCollections$,
setRESTCollections,
appendRESTCollections,
} from "~/newstore/collections"
export default {
export default defineComponent({
props: {
show: Boolean,
collectionsType: { type: Object, default: () => {} },
},
setup() {
return {
myCollections: useReadonlyStream(restCollections$, []),
currentUser: useReadonlyStream(currentUser$, null),
}
},
data() {
return {
showJsonCode: false,
@@ -187,12 +195,6 @@ export default {
collectionJson: "",
}
},
subscriptions() {
return {
myCollections: restCollections$,
currentUser: currentUser$,
}
},
methods: {
async createCollectionGist() {
this.getJSONCollection()
@@ -547,5 +549,5 @@ export default {
return Object.prototype.hasOwnProperty.call(item, "item")
},
},
}
})
</script>