Skip to content

Commit f71bfa8

Browse files
committed
fix data fetching example
1 parent 677bf66 commit f71bfa8

File tree

3 files changed

+6
-6
lines changed

3 files changed

+6
-6
lines changed

src/examples/src/fetching-data/App/composition.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
import { ref, watchEffect } from 'vue'
22

33
const API_URL = `https://api.github.com/repos/vuejs/core/commits?per_page=3&sha=`
4-
const branches = ['master', 'v2-compat']
4+
const branches = ['main', 'v2-compat']
55

66
export default {
77
setup() {
8-
const currentBranch = ref('master')
8+
const currentBranch = ref(branches[0])
99
const commits = ref(null)
1010

1111
watchEffect(async () => {

src/examples/src/fetching-data/App/options.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@ const API_URL = `https://api.github.com/repos/vuejs/core/commits?per_page=3&sha=
22

33
export default {
44
data: () => ({
5-
branches: ['master', 'v2-compat'],
6-
currentBranch: 'master',
5+
branches: ['main', 'v2-compat'],
6+
currentBranch: 'main',
77
commits: null
88
}),
99

src/examples/src/fetching-data/App/template.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<h1>Latest Vue.js Commits</h1>
1+
<h1>Latest Vue Core Commits</h1>
22
<template v-for="branch in branches">
33
<input type="radio"
44
:id="branch"
@@ -17,4 +17,4 @@ <h1>Latest Vue.js Commits</h1>
1717
</span>
1818
at <span class="date">{{ formatDate(commit.author.date) }}</span>
1919
</li>
20-
</ul>
20+
</ul>

0 commit comments

Comments
 (0)