<script>
import { defineProps, defineEmits } from 'vue';
import { useStore } from 'vuex';
import { useRouter } from 'vue-router';

export default {
  setup() {
    const store = useStore();
    const router = useRouter();

    const user = store.state.user;

    if (user) {
      router.push({ name: 'home' });
    }
  }
};
</script>