-
Notifications
You must be signed in to change notification settings - Fork 36
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes for generating full static site #315
Conversation
503ff81
to
664e595
Compare
CI failed due to no dependency of axios. (we use |
db2806e
to
3fc4a62
Compare
…use asyncData fetching data
fix(header/style): update color of menu and icon to pink-700
…to feat/generate-static-site
eventType: params.eventType, | ||
eventId: params.id, | ||
}) | ||
const speechData = store.state.speechData |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
store.state?.speechData
eventType: params.eventType, | ||
eventId: params.id, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
eventType: params?.eventType,
eventId: params?.id,
await store.dispatch('$getSpeechesData', eventType) | ||
const speechesData = store.state.speechesData.map((speech) => ({ | ||
...speech, | ||
begin_time: speech.begin_time ? new Date(speech.begin_time) : null, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
speech?.begin_time
async asyncData({ store, app }) { | ||
await store.dispatch('$getKeynotesData') | ||
|
||
const keynotesData = store.state.keynotesData.map((keynote) => ({ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
const keynotesData = store.state?.keynotesData.map((keynote) => ({
@@ -120,6 +119,13 @@ export default { | |||
I18nPageWrapper, | |||
Intro, | |||
}, | |||
async asyncData({ store }) { | |||
await store.dispatch('$getSponsorsData') | |||
const sponsorsData = store.state.sponsorsData |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
const sponsorsData = store.state?.sponsorsData
@@ -39,19 +39,24 @@ export default { | |||
JobsCardCollection, | |||
JobsPanel, | |||
}, | |||
async asyncData({ store, app }) { | |||
await store.dispatch('$getJobsData') | |||
const jobsData = store.state.jobsData.map((sponsor) => ({ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
const jobsData = store.state?.jobsData.map((sponsor) => ({
const eventType = params.eventType | ||
if (!['talks', 'tutorials'].includes(eventType)) { | ||
redirect('/') | ||
} | ||
await store.dispatch('$getSpeechesData', eventType) | ||
const speechesData = store.state.speechesData.map((speech) => ({ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
const speechesData = store.state?.speechesData.map((speech) => ({
`${DEFAULT_BASE_URL}/api/events/speeches/${tutorial.event_type}/${tutorial.id}/`, | ||
config, | ||
) | ||
.then((response) => response.data) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
.then((response) => response?.data)
Duplicated with #380 |
Types of changes
Description
Steps to Test This Pull Request
npm run json-server
npm run generate
npm run start
Expected behavior
Related Issue
(Not sure if it could fix_ #308)
Fix #339