export default defineNuxtRouteMiddleware((to, from) => {
  // Grab the current user state from the Strapi module
  const user = useStrapiUser()

  // If there is no logged-in user, redirect them to the login page
  if (!user.value) {
    return navigateTo('/login')
  }
})