Skip to main content
Glama
ProfilePanel.tsx1.23 kB
'use client'; import { Button } from '@intlayer/design-system'; import { useUser } from '@intlayer/design-system/hooks'; import { useRouter } from 'next/navigation'; import type { FC } from 'react'; import { PagesRoutes } from '@/Routes'; export const ProfilePanel: FC = () => { const { isUnauthenticated, user, logout } = useUser(); const router = useRouter(); const handleLogOut = () => { logout() .then(() => router.refresh()) .catch((err) => console.error(err)); }; if (isUnauthenticated) { return <></>; } return ( <div className="flex flex-col gap-5"> {user?.name && ( <span className="whitespace-nowrap font-bold text-lg">{user.name}</span> )} {user?.email && ( <span className="whitespace-nowrap text-base">{user.email}</span> )} <Button variant="link" color="text" onClick={() => router.push(PagesRoutes.Auth_ChangePassword)} label="Replace your password with a new one." > Change password </Button> <Button variant="outline" color="text" onClick={handleLogOut} label="Logout from app" > Logout </Button> </div> ); };

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