Skip to content

Commit

Permalink
Merge pull request #5912 from WiXSL/fix-typos
Browse files Browse the repository at this point in the history
Fix typos
  • Loading branch information
djhi committed Feb 15, 2021
2 parents 0859039 + 56697ea commit 8525f83
Show file tree
Hide file tree
Showing 6 changed files with 8 additions and 8 deletions.
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

0 comments on commit 8525f83

Please sign in to comment.