<template>
 <div>
   <component :is="componentId"></component>
 </div>
</template>

<script>
  import userRecord from "./userRecord";
  import UserStatisticsInfo from "./UserStatisticsInfo";
  import { mapGetters } from 'vuex'
  export default {
    components:{userRecord,UserStatisticsInfo},
    data(){
      return {
        componentId:'userRecord'
      }
    },
    computed: { ...mapGetters({ isFrontStudent: 'isFrontStudent' }) },
    created() {
      if(this.isFrontStudent){
        this.componentId='UserStatisticsInfo'
      }else{
        this.componentId='userRecord'
      }
    }


  }
</script>U
