Skip to main content
Glama

MCPDemo - Visual SQL Chat Platform

by Ayi456
ProtectedRoute.tsx438 B
import { Navigate } from 'react-router-dom' import useAuth from '@/store/useAuth' export default function ProtectedRoute({ children }: { children: JSX.Element }){ const { user, hydrated, loadFromStorage } = useAuth() if(!hydrated){ try{ loadFromStorage() }catch{} // 等待一次 hydration 完成,避免误判为未登录 return null } if(!user){ return <Navigate to="/auth" replace /> } return children }

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/Ayi456/visual-mcp'

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