Fix integrations page double-refresh on load (#1134)

Co-authored-by: Claude <noreply@anthropic.com>
Co-authored-by: claude[bot] <41898282+claude[bot]@users.noreply.github.com>
Co-authored-by: Vedant Mahajan <vedant.04.mahajan@gmail.com>
This commit is contained in:
Mahesh Sanikommu 2026-06-23 07:31:40 -07:00 committed by GitHub
parent f28e974609
commit 32a6055f7c
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -20,12 +20,12 @@ export function EnsureWorkspace({ children }: { children: React.ReactNode }) {
const pathname = usePathname()
const router = useRouter()
const searchParams = useSearchParams()
const { session, organizations, isRestoring } = useAuth()
const { session, organizations, isRestoring, isSessionPending } = useAuth()
const isPublicAppPage =
pathname === "/" &&
["integrations", "mcp"].includes(searchParams.get("view") ?? "")
const isGuestPublicAppPage = isPublicAppPage && !session
const isGuestPublicAppPage = isPublicAppPage && !session && !isSessionPending
const isOnboarding = pathname.startsWith("/onboarding")
useEffect(() => {