<template>
  <h1>Carrier</h1>
  <p>You are logged in.</p>
  <button @click="logout">Log Out</button>
</template>

<script setup>
import { useRouter } from 'vue-router'

const router = useRouter()

async function logout() {
  await fetch('/logout', { method: 'POST' })
  router.push('/login')
}
</script>
