Skip to main content
Glama
index.tsx1.32 kB
'use client'; import { SwitchSelector, type SwitchSelectorChoices, } from '@intlayer/design-system'; import { useIntlayer } from 'next-intlayer'; import { type FC, useState } from 'react'; import { DemoCodeSandbox } from './DemoCodeSandbox'; import { DemoYoutube } from './DemoYoutube'; enum DemoType { Youtube, CodeSandbox, } export const DemoSection: FC = () => { const [demoType, setDemoType] = useState<DemoType>(DemoType.Youtube); const { title, demoSwitchSelector } = useIntlayer('demo-section'); const demoSection = [ { content: demoSwitchSelector.youtube, value: DemoType.Youtube, }, { content: demoSwitchSelector.codeSandbox, value: DemoType.CodeSandbox, }, ] as SwitchSelectorChoices<DemoType>; return ( <section className="z-10 flex w-full flex-col items-center justify-center"> <h2 className="text-neutral">{title}</h2> <div className="my-6 flex w-full max-w-[1000px] flex-col items-center gap-5 px-10 md:px-20"> <SwitchSelector choices={demoSection} defaultValue={demoType} onChange={setDemoType} color="text" /> {demoType === DemoType.Youtube && <DemoYoutube />} {demoType === DemoType.CodeSandbox && <DemoCodeSandbox />} </div> </section> ); };

Latest Blog Posts

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/aymericzip/intlayer'

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