[READ-ONLY] a fast, modern browser for the npm registry
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

fix: do not hit session endpoint in ssr (#807)

authored by

Daniel Roe and committed by
GitHub
3c9ab66d b8584f32

+9 -2
app/components/Header/MobileMenu.vue app/components/Header/MobileMenu.client.vue
+8 -1
app/composables/useAtproto.ts
··· 1 1 import type { UserSession } from '#shared/schemas/userSession' 2 2 3 3 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 + }) 5 12 6 13 async function logout() { 7 14 await $fetch('/api/auth/session', {
+1 -1
test/unit/a11y-component-coverage.spec.ts
··· 32 32 // Complex components requiring full app context or specific runtime conditions 33 33 'Header/OrgsDropdown.vue': 'Requires connector context and API calls', 34 34 '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', 36 36 'Modal.client.vue': 37 37 'Base modal component - tested via specific modals like ChartModal, ConnectorModal', 38 38 'Package/SkillsModal.vue': 'Complex modal with tabs - requires modal context and state',