fix: handle access_token only response from switchContext

This commit is contained in:
Usman Baig
2026-01-22 01:36:56 +01:00
parent 806b149bc7
commit cbb2255024
5 changed files with 23 additions and 17 deletions

View File

@@ -25,8 +25,8 @@ export default function LayoutContent({ children }: { children: React.ReactNode
const handleSwitchWorkspace = async (orgId: string) => {
try {
const { token, refresh_token } = await switchContext(orgId)
await setSessionAction(token, refresh_token)
const { access_token } = await switchContext(orgId)
await setSessionAction(access_token)
window.location.reload()
} catch (err) {
console.error('Failed to switch workspace', err)