<template>
  <div class="home-page-wrapper">
    <HomePageHeader />
    <div class="home-page-content">
      <router-view />
    </div>
    <HomePageFooter />

    <ToTopButton />
  </div>
</template>
<script>
import HomePageHeader from '@/components/HomePageHeader.vue'
import HomePageFooter from '@/components/HomePageFooter.vue'
import ToTopButton from '@/components/ToTopButton.vue'

export default {
  name: 'HomePage',
  components: { HomePageHeader, HomePageFooter, ToTopButton },
  beforeRouteUpdate(to, from, next) {
    window.scrollTo({
      top: 0,
      behavior: 'smooth',
    })
    next()
  },
}
</script>
<style lang="scss">
.home-page-content {
  padding-top: var(--header-height);
}
</style>
