We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 5a12391 commit d2bb772Copy full SHA for d2bb772
src/views/News.vue
@@ -26,15 +26,15 @@
26
import Spinner from '../components/Spinner.vue'
27
import NewsItem from '../components/NewsItem.vue'
28
29
-const fetchData = store => {
+const fetchInitialData = store => {
30
return store
31
.dispatch(`FETCH_TOP_IDS`)
32
.then(() => store.dispatch(`FETCH_NEWS`))
33
}
34
35
export default {
36
name: 'news',
37
- prefetch: fetchData,
+ prefetch: fetchInitialData,
38
components: {
39
Spinner,
40
NewsItem
@@ -60,7 +60,7 @@ export default {
60
61
},
62
mounted () {
63
- fetchData(this.$store)
+ fetchInitialData(this.$store)
64
if (this.page > this.maxPage) {
65
this.$router.push('/')
66
0 commit comments