-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #236 from nih-sparc/Use-SSR-effectively-by-rending…
…-only-server-side Use ssr effectively by rending only server side
- Loading branch information
Showing
27 changed files
with
1,566 additions
and
2,042 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,35 +1,28 @@ | ||
<template> | ||
<paper | ||
<Paper | ||
:text="parseMarkdown(searchPaperText)" | ||
:button-text="searchPaperNEButton" | ||
:button-link="{ name: 'contact-us', query: { type: 'news-event'} }" | ||
new-tab | ||
/> | ||
</template> | ||
|
||
<script> | ||
import Paper from '@/components/Paper/Paper.vue' | ||
import marked from '@/mixins/marked/index' | ||
<script setup> | ||
import { useNuxtApp, useRuntimeConfig } from '#imports'; | ||
import Paper from '@/components/Paper/Paper.vue'; | ||
import { parseMarkdown } from '@/utils/formattingUtils.js' | ||
export default { | ||
name: 'SubmitNewsSection', | ||
const config = useRuntimeConfig(); | ||
const { $contentfulClient } = useNuxtApp(); | ||
mixins: [marked], | ||
const { data } = await useAsyncData('newsAndEventsPage', async () => { | ||
const pageData = await $contentfulClient.getEntry(config.public.ctf_news_and_events_page_id); | ||
return { | ||
fields: pageData.fields || {}, | ||
} | ||
}); | ||
components: { | ||
Paper | ||
}, | ||
const searchPaperNEButton = computed(() => data.value?.fields.searchPaperNeButton || '') | ||
const searchPaperText = computed(() => data.value?.fields.searchPaperText || '') | ||
async setup() { | ||
const config = useRuntimeConfig() | ||
const { $contentfulClient } = useNuxtApp() | ||
const response = await $contentfulClient.getEntry(config.public.ctf_news_and_events_page_id) | ||
const searchPaperNEButton = response.fields.searchPaperNeButton | ||
const searchPaperText = response.fields.searchPaperText | ||
return { | ||
searchPaperNEButton, | ||
searchPaperText | ||
} | ||
} | ||
} | ||
</script> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.