<template>
  <UApp>
    <NuxtPage />
  </UApp>
</template>

<script setup lang="ts">
import { onMounted, useAuth } from './.nuxt/imports';

// Get auth session data
const { getSession } = useAuth();

// Store JWT in local storage when it's available
onMounted(async () => {
  const session = await getSession();
  if (session?.accessToken) {
    localStorage.setItem('jwt', session.accessToken);
  }
});
</script>
