Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[docs] authentication nofitication issue 4491 #4492

Merged
Merged
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion docs/Authentication.md
Original file line number Diff line number Diff line change
Expand Up @@ -230,7 +230,7 @@ Use the `useLogin` and `useLogout` hooks in your custom `LoginPage` and `LogoutB
```jsx
// in src/MyLoginPage.js
import React, { useState } from 'react';
import { useLogin, useNotify } from 'react-admin';
import { useLogin, useNotify, Notification } from 'react-admin';
import { ThemeProvider } from '@material-ui/styles';

const MyLoginPage = ({ theme }) => {
Expand All @@ -249,6 +249,7 @@ const MyLoginPage = ({ theme }) => {
<form onSubmit={submit}>
<input name="email" type="email" value={email} onChange={e => setEmail(e.target.value)} />
<input name="password" type="password" value={password} onChange={e => setPassword(e.target.value)} />
<Notification />
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Probably nitpicking but I would put the <Notification /> outside the form. I'll let the other core members decide though

</form>
</ThemeProvider>
);
Expand Down