Skip to content

Commit bc35b1e

Browse files
committed
Fix data fetching on rollup rank page
1 parent 1871784 commit bc35b1e

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

pages/rollup/rank/[slug].vue

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -24,12 +24,6 @@ const modalsStore = useModalsStore()
2424
const route = useRoute()
2525
const router = useRouter()
2626
27-
if (!(isMainnet() && !!rollupRankingServiceURL())) {
28-
router.push("/")
29-
} else {
30-
await fetchData()
31-
}
32-
3327
// Pagination
3428
const limit = 10
3529
const page = ref(1)
@@ -51,6 +45,12 @@ const repos = ref([])
5145
const commits = ref([])
5246
const totalCommits = computed(() => commits.value?.reduce((acc, c) => acc + c.amount, 0))
5347
48+
if (!(isMainnet() && !!rollupRankingServiceURL())) {
49+
router.push("/")
50+
} else {
51+
await fetchData()
52+
}
53+
5454
function getMetricDescription(metric) {
5555
switch (metric) {
5656
case "blobs":
@@ -71,7 +71,7 @@ function getMetricDescription(metric) {
7171
}
7272
const chartEl = ref(null)
7373
74-
const getRollupRepos = async (slug) => {
74+
async function getRollupRepos(slug) {
7575
const data = await fetchRollupOrgReposBySlug({
7676
slug: slug,
7777
limit: limit,

0 commit comments

Comments
 (0)