Skip to main content
Glama
App.tsx1.41 kB
// SPDX-FileCopyrightText: Copyright Orangebot, Inc. and Medplum contributors // SPDX-License-Identifier: Apache-2.0 import { AppShell } from '@mantine/core'; import { ErrorBoundary, useMedplum } from '@medplum/react'; import { Suspense } from 'react'; import type { JSX } from 'react'; import { Navigate, Route, Routes } from 'react-router'; import { Router } from './Router'; import { Footer } from './components/Footer'; import { Header } from './components/Header'; import { Loading } from './components/Loading'; import { RegisterPage } from './pages/RegisterPage'; import { SignInPage } from './pages/SignInPage'; import { LandingPage } from './pages/landing'; export function App(): JSX.Element | null { const medplum = useMedplum(); if (medplum.isLoading()) { return null; } if (!medplum.getProfile()) { return ( <Routes> <Route path="/" element={<LandingPage />} /> <Route path="signin" element={<SignInPage />} /> <Route path="register" element={<RegisterPage />} /> <Route path="*" element={<Navigate replace to="/" />} /> </Routes> ); } return ( <AppShell header={{ height: 80 }}> <Header /> <AppShell.Main> <ErrorBoundary> <Suspense fallback={<Loading />}> <Router /> </Suspense> </ErrorBoundary> </AppShell.Main> <Footer /> </AppShell> ); }

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/medplum/medplum'

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