Bläddra i källkod

:bug: depluralize welcome page

tags/0.9.0
j 4 år sedan
förälder
incheckning
7c7fe4bdcb
1 ändrade filer med 7 tillägg och 7 borttagningar
  1. 7
    7
      vue-theme/src/pages/index.vue

+ 7
- 7
vue-theme/src/pages/index.vue Visa fil

43
     components: { card },
43
     components: { card },
44
     data() {
44
     data() {
45
         return {
45
         return {
46
-            firstRow: ['episodes', 'exhibitions', 'events', 'artists', 'posts'],
47
-            secondRow: 'artists', // This is only ONE post
48
-            thirdRow: ['episodes', 'exhibitions', 'events', 'artists', 'posts'],
46
+            firstRow: ['episode', 'exhibition', 'event', 'artist', 'post'],
47
+            secondRow: 'artist', // This is only ONE post
48
+            thirdRow: ['episode', 'exhibition', 'event', 'artist', 'post'],
49
         }
49
         }
50
     },
50
     },
51
     async created() {
51
     async created() {
52
         // console.log(wp)
52
         // console.log(wp)
53
-        const omit = ['events', 'exhibitions']
53
+        const omit = ['event', 'exhibition']
54
         for (let type of postTypes) {
54
         for (let type of postTypes) {
55
-            const action = `getAll${convertTitleCase(type)}`
55
+            const action = `getAll${convertTitleCase(type)}s`
56
 
56
 
57
             // We try and fetch EVERYTHING except
57
             // We try and fetch EVERYTHING except
58
             // for EVENTS and EXHIBITIONS
58
             // for EVENTS and EXHIBITIONS
92
             this.$store.commit('SET_HERO', json)
92
             this.$store.commit('SET_HERO', json)
93
         },
93
         },
94
         firstPostOfType(type) {
94
         firstPostOfType(type) {
95
-            return Object.values(this[`all${convertTitleCase(type)}`])[0]
95
+            return Object.values(this[`all${convertTitleCase(type)}s`])[0]
96
         },
96
         },
97
         randomPostOfType(type) {
97
         randomPostOfType(type) {
98
             const postsOfType = Object.values(
98
             const postsOfType = Object.values(
99
-                this[`all${convertTitleCase(type)}`],
99
+                this[`all${convertTitleCase(type)}s`],
100
             )
100
             )
101
             // console.log(postsOfType)
101
             // console.log(postsOfType)
102
             const max = postsOfType.length
102
             const max = postsOfType.length

Laddar…
Avbryt
Spara