You can not select more than 25 topics
			Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
		
		
		
		
		
			
		
			
				
					
					
						
							30 lines
						
					
					
						
							745 B
						
					
					
				
			
		
		
	
	
							30 lines
						
					
					
						
							745 B
						
					
					
				<template>
 | 
						|
  <div class="flex justify-between items-center">
 | 
						|
    <h2 v-t="'My courses'" />
 | 
						|
    <Button
 | 
						|
      v-if="isTeacher"
 | 
						|
      :label="t('Course')"
 | 
						|
      class="p-button-secondary hidden md:inline-flex"
 | 
						|
      icon="pi pi-plus"
 | 
						|
      @click="redirectToCreateCourse"
 | 
						|
    />
 | 
						|
  </div>
 | 
						|
  <hr>
 | 
						|
  <router-view />
 | 
						|
</template>
 | 
						|
 | 
						|
<script setup>
 | 
						|
import Button from 'primevue/button';
 | 
						|
import { useI18n } from 'vue-i18n';
 | 
						|
import { storeToRefs } from "pinia"
 | 
						|
import { useSecurityStore } from "../store/securityStore"
 | 
						|
import { useRouter } from "vue-router"
 | 
						|
 | 
						|
const { t } = useI18n();
 | 
						|
const { isTeacher } = storeToRefs(useSecurityStore())
 | 
						|
const router = useRouter()
 | 
						|
 | 
						|
const redirectToCreateCourse = () => {
 | 
						|
  router.push({ name: 'CourseCreate' })
 | 
						|
}
 | 
						|
</script>
 | 
						|
 |