<template>
  <router-view v-bind="$attrs" />
</template>

<script lang="ts">
import { Component, Vue } from 'vue-property-decorator'
import { RouteHelper } from '@/widgets/base/RouteHelper'

@Component({ inheritAttrs: false })
export default class WidgetsPage extends Vue {
  created() {
    const lastRoute = RouteHelper.getLastLocation()

    if (!this.$route.path && lastRoute) {
      this.$router.push({ path: lastRoute.path })
    }
  }
}
</script>
