Просмотр исходного кода

:bug: depluralize welcome page

tags/0.9.0
j 4 лет назад
Родитель
Сommit
7c7fe4bdcb
1 измененных файлов: 7 добавлений и 7 удалений
  1. 7
    7
      vue-theme/src/pages/index.vue

+ 7
- 7
vue-theme/src/pages/index.vue Просмотреть файл

@@ -43,16 +43,16 @@ export default {
43 43
     components: { card },
44 44
     data() {
45 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 51
     async created() {
52 52
         // console.log(wp)
53
-        const omit = ['events', 'exhibitions']
53
+        const omit = ['event', 'exhibition']
54 54
         for (let type of postTypes) {
55
-            const action = `getAll${convertTitleCase(type)}`
55
+            const action = `getAll${convertTitleCase(type)}s`
56 56
 
57 57
             // We try and fetch EVERYTHING except
58 58
             // for EVENTS and EXHIBITIONS
@@ -92,11 +92,11 @@ export default {
92 92
             this.$store.commit('SET_HERO', json)
93 93
         },
94 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 97
         randomPostOfType(type) {
98 98
             const postsOfType = Object.values(
99
-                this[`all${convertTitleCase(type)}`],
99
+                this[`all${convertTitleCase(type)}s`],
100 100
             )
101 101
             // console.log(postsOfType)
102 102
             const max = postsOfType.length

Загрузка…
Отмена
Сохранить