---
import { logout } from '../../lib/userCookies'

await logout(Astro)

// eslint-disable-next-line @typescript-eslint/prefer-nullish-coalescing
return Astro.redirect(Astro.url.searchParams.get('redirect') || Astro.request.headers.get('referer') || '/')
---
