Skip to content

Commit

Permalink
feat: Remove Vuex usage in HotNewsBanner
Browse files Browse the repository at this point in the history
  • Loading branch information
VincentHardouin authored Nov 8, 2021
1 parent 177f0fa commit f1c55ee
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions components/HotNewsBanner.vue
Original file line number Diff line number Diff line change
Expand Up @@ -11,16 +11,23 @@
</template>

<script>
import { mapState } from 'vuex'
import { documentFetcher, documents } from '~/services/document-fetcher'
export default {
name: 'HotNewsBanner',
data() {
return {
isOpen: true,
hotNews: null,
}
},
computed: mapState(['hotNews']),
async fetch() {
const hotNews = await documentFetcher(this.$prismic, this.$i18n).findByType(
documents.hotNews
)
this.hotNews = hotNews?.data?.description
},
methods: {
closeBanner() {
this.isOpen = false
Expand Down

0 comments on commit f1c55ee

Please sign in to comment.