<template>
  <div>
    Smart E Library Content
  </div>
</template>
<script>
import { mapGetters } from 'vuex'
import { DASHBOARD_HOME } from '@/config/url-prefix'

export default {
  name: 'SmartELibrary',
  beforeRouteEnter(to, from, next) {
    let path = from.path
    next(vm => {
      vm.previousRoute = path
    })
  },
  components: {},
  data() {
    return {
      previousRoute: DASHBOARD_HOME,
    }
  },
  mounted() {
    window.open(this.getTemporaryUrl, '_blank')
    this.$router.replace(this.previousRoute)
  },
  methods: {},
  computed: {
    ...mapGetters(['getTemporaryUrl']),
  },
}
</script>
