<template></template>

<script lang="ts">
import { defineComponent, ref } from "vue";
import { useQuasar } from "quasar";
import { useRouter } from "vue-router";

export default defineComponent({
  name: "RedirectPage",

  components: {},

  setup() {
    let $q = useQuasar();
    let $router = useRouter();
    if (
      ($q.platform.is.mobile && $q.platform.has.touch) ||
      $q.platform.is.ipad
    ) {
      if (window.innerWidth > window.innerHeight) {
        $router.push("/pad");
      } else {
        // TODO route to mobile
        $router.push("/pc");
      }
    } else {
      $router.push("/pc");
    }
  },
});
</script>
