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

Fix typos #5912

Merged
merged 2 commits into from Feb 15, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion UPGRADE.md
Expand Up @@ -645,7 +645,7 @@ const i18nProvider = {
// load new messages and update the translate function
})
},
getLocale: () => locale;
getLocale: () => locale
}
```

Expand Down
2 changes: 1 addition & 1 deletion docs/Authentication.md
Expand Up @@ -271,7 +271,7 @@ export default {

### Logout Configuration

If you enable authentication, react-admin adds a logout button in the user menu in the top bar (or in the sliding menu on mobile. When the user clicks on the logout button, this calls the `authProvider.logout()` method, and removes potentially sensitive data from the Redux store. Then the user gets redirected to the login page. The two previous sections also illustrated that react-admin can call `authProvider.logout()` itself, when the API returns a 403 error or when the local credentials expire.
If you enable authentication, react-admin adds a logout button in the user menu in the top bar (or in the sliding menu on mobile). When the user clicks on the logout button, this calls the `authProvider.logout()` method, and removes potentially sensitive data from the Redux store. Then the user gets redirected to the login page. The two previous sections also illustrated that react-admin can call `authProvider.logout()` itself, when the API returns a 403 error or when the local credentials expire.

It's the responsibility of the `authProvider.logout()` method to clean up the current authentication data. For instance, if the authentication was a token stored in local storage, here is the code to remove it:

Expand Down
2 changes: 1 addition & 1 deletion docs/Fields.md
Expand Up @@ -539,7 +539,7 @@ import { TextField } from 'react-admin';

### `<UrlField>`

`<UrlField>` displays an url in a Material UI's `<Link href="" />` component.
`<UrlField>` displays a url in a Material UI's `<Link href="" />` component.

```jsx
import { UrlField } from 'react-admin';
Expand Down
2 changes: 1 addition & 1 deletion docs/Tutorial.md
Expand Up @@ -200,7 +200,7 @@ What you've just done reflects the early stages of development with react-admin:

You've just met the `<TextField>` and the `<EmailField>` components. React-admin provides [many more Field components](./Fields.md), mapping various data types: number, date, image, HTML, array, reference, etc.

For instance, the `website` field looks like an URL. Instead of displaying it as text, why not display it using a clickable link? That's exactly what the `<UrlField>` does:
For instance, the `website` field looks like a URL. Instead of displaying it as text, why not display it using a clickable link? That's exactly what the `<UrlField>` does:

```diff
// in src/users.js
Expand Down
Expand Up @@ -187,7 +187,7 @@ describe('inferElementFromValues', () => {
).getElement()
).toEqual(<Good source="foo" />);
});
it('should return an url field for url name', () => {
it('should return a url field for url name', () => {
const types = {
url: { component: Good },
string: { component: Bad },
Expand All @@ -200,7 +200,7 @@ describe('inferElementFromValues', () => {
).getElement()
).toEqual(<Good source="url" />);
});
it.skip('should return an url field for url string values', () => {
it.skip('should return a url field for url string values', () => {
const types = {
url: { component: Good },
string: { component: Bad },
Expand Down
4 changes: 2 additions & 2 deletions packages/ra-core/src/inference/inferTypesFromValues.spec.ts
Expand Up @@ -102,13 +102,13 @@ describe('inferTypeFromValues', () => {
props: { source: 'foo' },
});
});
it('should return an url field for url name', () => {
it('should return a url field for url name', () => {
expect(inferTypeFromValues('url', ['whatever', 'whatever'])).toEqual({
type: 'url',
props: { source: 'url' },
});
});
it.skip('should return an url field for url string values', () => {
it.skip('should return a url field for url string values', () => {
expect(
inferTypeFromValues('foo', [
'http://foo.com/bar',
Expand Down