mirror your GitHub repos to tangled.org automatically
1

Configure Feed

Select the types of activity you want to include in your feed.

fix: render /connect page with no js

+13 -15
+12 -14
app/pages/connect.vue
··· 8 8 9 9 const route = useRoute() 10 10 11 - const installationId = computed(() => { 12 - const raw = route.query.installation_id 13 - return typeof raw === 'string' && /^\d+$/.test(raw) ? raw : null 14 - }) 15 - const verified = computed(() => route.query.verified === '1') 16 - 17 - const { data: info } = await useFetch<ConnectInfo>('/api/connect/info', { 18 - query: { installationId }, 19 - immediate: !!installationId.value, 20 - ignoreResponseError: true, 21 - }) 11 + const rawId = route.query.installation_id 12 + const installationId = typeof rawId === 'string' && /^\d+$/.test(rawId) ? rawId : null 13 + const verified = route.query.verified === '1' 14 + const loginFromQuery = typeof route.query.login === 'string' ? route.query.login : null 22 15 23 - const login = computed(() => 24 - (typeof route.query.login === 'string' ? route.query.login : null) ?? info.value?.login ?? null, 16 + const { data: info } = await useAsyncData<ConnectInfo | null>( 17 + `connect-info-${installationId}`, 18 + () => installationId && !loginFromQuery 19 + ? $fetch<ConnectInfo>('/api/connect/info', { query: { installationId } }).catch(() => null) 20 + : Promise.resolve(null), 25 21 ) 26 - const accountLabel = computed(() => login.value ?? 'your GitHub account') 22 + 23 + const login = loginFromQuery ?? info.value?.login ?? null 24 + const accountLabel = login ?? 'your GitHub account' 27 25 </script> 28 26 29 27 <template>
+1 -1
nuxt.config.ts
··· 68 68 routeRules: { 69 69 '/': { noScripts: true, prerender: true }, 70 70 '/dashboard': { ssr: false, prerender: true }, 71 - '/connect': { ssr: false }, 71 + '/connect': { noScripts: true }, 72 72 }, 73 73 nitro: { 74 74 vercel: {