Update CONTEXT.md about new LoginArea

This commit is contained in:
Alex Gleason 2025-04-18 15:41:35 -05:00
parent 04673a276a
commit 7a8da77d69
No known key found for this signature in database
GPG Key ID: 7211D1F99744FBB7

View File

@ -152,23 +152,23 @@ The `useCurrentUser` hook should be used to ensure that the user is logged in be
### Nostr Login ### Nostr Login
To enable login with Nostr, simply include the `AccountSwitcher` component already included in this project. To enable login with Nostr, simply use the `LoginArea` component already included in this project.
```tsx ```tsx
import { AccountSwitcher } from "@/components/auth/AccountSwitcher"; import { LoginArea } from "@/components/auth/LoginArea";
function MyComponent() { function MyComponent() {
return ( return (
<div> <div>
{/* other components ... */} {/* other components ... */}
<AccountSwitcher /> <LoginArea />
</div> </div>
); );
} }
``` ```
The `AccountSwitcher` component displays a "Log in" button when the user is logged out, and changes to an account switcher once the user is logged in. The `LoginArea` component displays a "Log in" button when the user is logged out, and changes to an account switcher once the user is logged in. It handles all the login-related UI and interactions internally, including displaying login dialogs and switching between accounts.
## Development Practices ## Development Practices