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.
44 lines
831 B
44 lines
831 B
<script setup>
|
|
import BaseRouteTabs from "../basecomponents/BaseRouteTabs.vue"
|
|
import { useI18n } from "vue-i18n"
|
|
import { useRoute } from "vue-router"
|
|
import { computed } from "vue"
|
|
|
|
const { t } = useI18n()
|
|
const route = useRoute()
|
|
|
|
const selected = computed(() => {
|
|
switch (route.name) {
|
|
case "MySessions":
|
|
return 0
|
|
case "MySessionsUpcoming":
|
|
return 1
|
|
case "MySessionsPast":
|
|
return 2
|
|
default:
|
|
return 0
|
|
}
|
|
})
|
|
|
|
const sessionTabs = [
|
|
{
|
|
title: t("Current session tab"),
|
|
to: { name: "MySessions" },
|
|
},
|
|
{
|
|
title: t("Upcoming session tab"),
|
|
to: { name: "MySessionsUpcoming" },
|
|
},
|
|
{
|
|
title: t("Past session tab"),
|
|
to: { name: "MySessionsPast" },
|
|
},
|
|
]
|
|
</script>
|
|
|
|
<template>
|
|
<BaseRouteTabs
|
|
:selected-tab="selected"
|
|
:tabs="sessionTabs"
|
|
/>
|
|
</template>
|
|
|