Skip to content

Commit 3c9ab66

Browse files
authored
fix: do not hit session endpoint in ssr (#807)
1 parent b8584f3 commit 3c9ab66

3 files changed

Lines changed: 9 additions & 2 deletions

File tree

File renamed without changes.

app/composables/useAtproto.ts

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,14 @@
11
import type { UserSession } from '#shared/schemas/userSession'
22

33
export function useAtproto() {
4-
const { data: user, pending, clear } = useFetch<UserSession | null>('/api/auth/session')
4+
const {
5+
data: user,
6+
pending,
7+
clear,
8+
} = useFetch<UserSession | null>('/api/auth/session', {
9+
server: false,
10+
immediate: !import.meta.test,
11+
})
512

613
async function logout() {
714
await $fetch('/api/auth/session', {

test/unit/a11y-component-coverage.spec.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ const SKIPPED_COMPONENTS: Record<string, string> = {
3232
// Complex components requiring full app context or specific runtime conditions
3333
'Header/OrgsDropdown.vue': 'Requires connector context and API calls',
3434
'Header/PackagesDropdown.vue': 'Requires connector context and API calls',
35-
'Header/MobileMenu.vue': 'Requires Teleport and full navigation context',
35+
'Header/MobileMenu.client.vue': 'Requires Teleport and full navigation context',
3636
'Modal.client.vue':
3737
'Base modal component - tested via specific modals like ChartModal, ConnectorModal',
3838
'Package/SkillsModal.vue': 'Complex modal with tabs - requires modal context and state',

0 commit comments

Comments
 (0)