Skip to content

Commit

Permalink
fix: remove unnecessary comented code
Browse files Browse the repository at this point in the history
  • Loading branch information
pghorpade committed Feb 15, 2024
1 parent 29c5327 commit c5e6980
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 27 deletions.
6 changes: 0 additions & 6 deletions pages/about/reports/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -9,16 +9,10 @@ import IMPACT_REPORTS_LIST from '../gql/queries/ImpactReportsList.gql'
const { $graphql } = useNuxtApp()
const { data: page, error } = await useAsyncData('impact-report-all-list', async () => {
// try {
const data = await $graphql.default.request(IMPACT_REPORTS_LIST)
// console.log("Fetched data:", JSON.stringify(data))
return data
/* } catch (error) {
console.error("Error fetching data:", error)
} */
})
if (error.value) {
// console.log(error.value)
throw createError({
statusCode: 404, statusMessage: 'Page not found.', fatal: true
})
Expand Down
6 changes: 0 additions & 6 deletions pages/impact/[year]/[slug].vue
Original file line number Diff line number Diff line change
Expand Up @@ -14,17 +14,11 @@ const route = useRoute()
const variables = { slug: route.params.slug }
const { data, error } = await useAsyncData('impact-report-index', async () => {
// try {
const data = await $graphql.default.request(IMPACT_REPORT_STORY, variables)
// console.log("Fetched data:", JSON.stringify(data))
return data
/* } catch (error) {
console.error("Error fetching data:", error)
} */
})
if (error.value) {
// console.log(error.value)
throw createError({
statusCode: 404, statusMessage: 'Page not found.' + error.value, fatal: true
})
Expand Down
19 changes: 4 additions & 15 deletions pages/impact/[year]/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -17,24 +17,16 @@ definePageMeta({
})
const route = useRoute()
const path = route.params && route.params.year ? `impact/${route.params.year}` : '*'
// console.log("Path: ", path)
const variables = { path }
const { data, error } = await useAsyncData('impact-report-index', async () => {
// try {
const data = await $graphql.default.request(IMPACT_REPORT, variables)
// console.log("Fetched data:", JSON.stringify(data))
return data
/* } catch (error) {
console.error("Error fetching data:", error)
} */
})
if (error.value) {
// console.log(error.value)
throw createError({
statusCode: 404, statusMessage: 'Page not found.', fatal: true
})
}
// console.log("Impact Report data:", JSON.stringify(data))
if (!data.value.entry) {
throw createError({
statusCode: 404,
Expand All @@ -43,7 +35,6 @@ if (!data.value.entry) {
}
const page = ref(_get(data.value, 'entry', {}))
// console.log("Impact Report page:", JSON.stringify(page.value.text))
useHead({
title: page.value?.title || '... loading',
meta: [
Expand Down Expand Up @@ -155,12 +146,10 @@ const timelineSortedBySubtitle = computed(() => {
/>
</section-wrapper>
<section-wrapper v-if="page.acknowledgements && page.acknowledgements.length === 1">
<h2
:class="page.acknowledgements[0].displaySectionTitle === 'true'
? ''
: 'visually-hidden'
"
>
<h2 :class="page.acknowledgements[0].displaySectionTitle === 'true'
? ''
: 'visually-hidden'
">
{{ page.acknowledgements[0].titleGeneral }}
</h2>
<rich-text
Expand Down

0 comments on commit c5e6980

Please sign in to comment.