Skip to content

Commit

Permalink
Merge pull request #513 from rockleona/fix/render-sponsor
Browse files Browse the repository at this point in the history
fix(index): fix rendering bug on sponsor section
  • Loading branch information
SivanYeh authored Apr 27, 2024
2 parents 394952d + fabb483 commit e6c2e9a
Showing 1 changed file with 9 additions and 7 deletions.
16 changes: 9 additions & 7 deletions pages/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@
</template>

<script>
// import { mapState } from 'vuex'
import { mapState } from 'vuex'
import i18n from '@/i18n/index.i18n'
import { landingButtonConfig } from '@/configs/pageLanding'
import I18nPageWrapper from '@/components/core/i18n/PageWrapper'
Expand Down Expand Up @@ -148,10 +148,10 @@ export default {
async asyncData({ store, payload }) {
if (payload) return { sponsorsData: payload }
await store.dispatch('$getSponsorsData')
const sponsorsData = store.state.sponsorsData
return {
sponsorsData,
}
// const sponsorsData = store.state.sponsorsData
// return {
// sponsorsData,
// }
},
data() {
return {
Expand All @@ -161,9 +161,8 @@ export default {
selectedSponsor: {},
}
},
fetchOnServer: false,
computed: {
// ...mapState(['sponsorsData']),
...mapState(['sponsorsData']),
isBulleted() {
if (process.client) {
const width = window.innerWidth
Expand All @@ -186,6 +185,9 @@ export default {
return this.$store.state.configs.showIndexSponsorSection
},
},
created() {
this.$store.dispatch('$getSponsorsData')
},
methods: {
showModal(sponsor) {
this.isOpened = true
Expand Down

0 comments on commit e6c2e9a

Please sign in to comment.