Skip to main content
Glama

mcp-google-sheets

allow-logged-in-user-only-guard.tsx1.12 kB
import { Navigate, useLocation } from 'react-router-dom'; import { SocketProvider } from '@/components/socket-provider'; import { useTelemetry } from '@/components/telemetry-provider'; import { flagsHooks } from '@/hooks/flags-hooks'; import { platformHooks } from '@/hooks/platform-hooks'; import { projectHooks } from '@/hooks/project-hooks'; import { authenticationSession } from '../../lib/authentication-session'; type AllowOnlyLoggedInUserOnlyGuardProps = { children: React.ReactNode; }; export const AllowOnlyLoggedInUserOnlyGuard = ({ children, }: AllowOnlyLoggedInUserOnlyGuardProps) => { const { reset } = useTelemetry(); const location = useLocation(); if (!authenticationSession.isLoggedIn()) { authenticationSession.logOut(); reset(); const searchParams = new URLSearchParams(); searchParams.set('from', location.pathname + location.search); return <Navigate to={`/sign-in?${searchParams.toString()}`} replace />; } platformHooks.useCurrentPlatform(); flagsHooks.useFlags(); projectHooks.useCurrentProject(); return <SocketProvider>{children}</SocketProvider>; };

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/activepieces/activepieces'

If you have feedback or need assistance with the MCP directory API, please join our Discord server