We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/devsung94/next-mcp-test'
If you have feedback or need assistance with the MCP directory API, please join our Discord server
use-is-chatgpt-app.ts•525 B
import { useSyncExternalStore } from "react";
export function useIsChatGptApp(): boolean {
return useSyncExternalStore(
() => {
// No subscription needed for this static value
return () => {};
},
() => {
// Client snapshot - check the actual window value
if (typeof window === "undefined") return false;
return (window as any).__isChatGptApp ?? false;
},
() => {
// Server snapshot - always false since window is undefined on server
return false;
}
);
}