<script setup>
import { RouterLink, RouterView, useRouter } from 'vue-router'
import { onMounted } from 'vue'
import { userApi } from '@/components/userInfo'

const router = useRouter()

onMounted(() => {
  userApi.loginCheck().then(() => {
    if (userInfo.isLogin) {
      router.push('/main.html')
    } else {
      router.replace('/login.html')
    }
  })
})
</script>

<template>
  <RouterView class="flex-fill" />
  <footer class="w-100 border-top d-flex">
    <div class="bg-info-subtle p-2 d-flex align-items-center w-100 bg-purple">바닥글(저작권, 링크 등) 영역</div>
  </footer>
</template>

<style scoped></style>
