Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(example): fix repo and branches names in fetching example #3102

Merged
merged 1 commit into from
Nov 19, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/examples/src/fetching-data/App/composition.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { ref, watchEffect } from 'vue'

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

export default {
setup() {
Expand Down
2 changes: 1 addition & 1 deletion src/examples/src/fetching-data/App/options.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ const API_URL = `https://api.github.com/repos/vuejs/core/commits?per_page=3&sha=

export default {
data: () => ({
branches: ['main', 'v2-compat'],
branches: ['main', 'minor'],
currentBranch: 'main',
commits: []
}),
Expand Down
2 changes: 1 addition & 1 deletion src/examples/src/fetching-data/App/template.html
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ <h1>Latest Vue Core Commits</h1>
v-model="currentBranch">
<label :for="branch">{{ branch }}</label>
</template>
<p>vuejs/vue@{{ currentBranch }}</p>
<p>vuejs/core@{{ currentBranch }}</p>
<ul v-if="commits.length > 0">
<li v-for="{ html_url, sha, author, commit } in commits" :key="sha">
<a :href="html_url" target="_blank" class="commit">{{ sha.slice(0, 7) }}</a>
Expand Down
4 changes: 2 additions & 2 deletions src/examples/src/fetching-data/description.txt
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
This example fetches latest Vue.js commits data from GitHub’s API and displays them as a list.
You can switch between the two branches.
This example fetches latest Vue Core commits data from GitHub’s API and displays them as a list.
You can switch between the two primary branches.