Login page component for the AutoSuggestion Quiz application.
- Source:
Methods
(inner) LoginPage(props) → {React.ReactElement}
A login page component that handles user authentication. Renders a sign-in form with email and password fields, error messaging, and a shortcut "Register" button that pre-fills demo credentials.
Parameters:
| Name | Type | Description | ||||||
|---|---|---|---|---|---|---|---|---|
props |
Object |
Properties
|
- Source:
Returns:
The rendered login page.
- Type
- React.ReactElement
Example
<LoginPage onLogin={(user) => console.log('Logged in as', user.email)} />
Type Definitions
User
Type:
- Object
Properties:
| Name | Type | Attributes | Description |
|---|---|---|---|
email |
string | The authenticated user's email address. |
|
name |
string |
<optional> |
The authenticated user's display name. |
role |
string |
<optional> |
The authenticated user's role (e.g. 'student', 'admin'). |
- Source: