Skip to content

Commit

Permalink
Only show internal guides
Browse files Browse the repository at this point in the history
  • Loading branch information
jamesbayly committed Mar 18, 2024
1 parent 6811e2e commit f4230c9
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions docs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -227,10 +227,13 @@ const quickStartJson = ref([])

const fetchAllQuickStart = () => {
fetch("https://templates.subquery.network/guides").then(async (data) => {
const json = await data.json()
quickStartJson.value = json.results.sort((a,b) => b.quick_start_data.reduce((cur, add) => cur + add.quick_start_data.length, 0) - a.quick_start_data.reduce((cur, add) => cur + add.quick_start_data.length, 0))
}
)
const json = await data.json();
const guides = json.results.sort((a,b) => b.quick_start_data.reduce((cur, add) => cur + add.quick_start_data.length, 0) - a.quick_start_data.reduce((cur, add) => cur + add.quick_start_data.length, 0));
quickStartJson.value = guides.map(family => {
family.quick_start_data.map(qsd => qsd.quick_start_data = qsd.quick_start_data.filter(qs => qs.internal));
return family;
});
})
}

onMounted(() => {
Expand Down

0 comments on commit f4230c9

Please sign in to comment.