loading graphql project contents

This commit is contained in:
2020-09-16 16:06:18 +02:00
parent 7c566a67d9
commit 15ad778ce2
5 changed files with 119 additions and 43 deletions
+17 -7
View File
@@ -41,14 +41,20 @@
</template>
<script>
import { mapInstanceState } from '@urbn/vuex-helpers'
// import { mapState, mapGetters } from 'vuex'
import * as THREE from 'three'
import mixins from 'components/mixins'
import { mapState, mapGetters } from 'vuex'
// We'll determine our module based on the moduleName prop on this component
// https://www.npmjs.com/package/@urbn/vuex-helpers
const getModuleName = cmp => `project:${cmp.prtId}`
export default {
name: 'ContentBlock',
mixins: [mixins],
props: { prtPosition: Object, prtSize: Object, prtIndex: Number, type: String, data: Object },
props: { prtId: Number, prtIndex: Number, type: String, data: Object },
data: () => ({
// block3d: null,
project: null,
@@ -86,11 +92,15 @@ export default {
face: null
}),
computed: {
...mapState({
projects: state => state.Projects.projects
}),
...mapGetters({
getGridPos: 'Projects/getGridPos'
// ...mapState({
// projects: state => state.Projects.projects
// }),
// ...mapGetters({
// getGridPos: 'Projects/getGridPos'
// }),
...mapInstanceState(getModuleName, {
size: state => state.size,
position: state => state.position
}),
color () {
let color = 0x000000