<template>
  <div v-if="isTeam">
    <TeamResult :id="id" />
  </div>
  <div v-else-if="isDriver">
    <DriverResult :id="id" />
  </div>
  <div v-else>
    <div class="result"></div>
  </div>
</template>

<script setup lang="ts">

import { ref, computed, onMounted, Suspense } from 'vue'
import { useRoute } from 'vue-router'
import TeamResult from '@/components/TeamResult.vue'
import DriverResult from '@/components/DriverResult.vue'
const name = ref('')

const route = useRoute()

const isTeam = computed(() => route.path.includes('/teams'))
const isDriver = computed(() => route.path.includes('/drivers'))

const id = Number(route.params.id)

</script>

<style scoped lang="scss">
.result {
  padding: 20px;
}
</style>
