Skip to content

Commit

Permalink
Merge pull request #5946 from WiXSL/fix-typos
Browse files Browse the repository at this point in the history
Fix typos in docs and comments
  • Loading branch information
djhi committed Feb 23, 2021
2 parents a62f282 + 02b00d8 commit ea1f85c
Show file tree
Hide file tree
Showing 17 changed files with 19 additions and 19 deletions.
2 changes: 1 addition & 1 deletion CHANGELOG.md
Expand Up @@ -11,7 +11,7 @@
* Fix form children props are overridden ([5895](https://github.com/marmelab/react-admin/pull/5895)) ([djhi](https://github.com/djhi))
* [Doc] Add lb4, processmaker3, and mixer data provider links ([5939](https://github.com/marmelab/react-admin/pull/5939)) ([ckoliber](https://github.com/ckoliber))
* [Doc] Fix minor typos ([5912](https://github.com/marmelab/react-admin/pull/5912)) ([WiXSL](https://github.com/WiXSL))
* [TypeScript] Fix data provider mutation types don't allow to specity Record type ([5934](https://github.com/marmelab/react-admin/pull/5934)) ([andrico1234](https://github.com/andrico1234))
* [TypeScript] Fix data provider mutation types don't allow to specify Record type ([5934](https://github.com/marmelab/react-admin/pull/5934)) ([andrico1234](https://github.com/andrico1234))

## v3.12.4

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

Redirecting to the login page whenever a REST response uses a 401 status code is usually not enough. React-admin keeps data on the client side, and could briefly display stale data while contacting the server - even after the credentials are no longer valid.

Fortunately, each time the user navigates to a list, edit, create or show page, react-admin calls the `authProvider.checkAuth()` method. If this method returns a rejected Promise, react-admin calls `authProvider.logout()` and redirects the user to the login page. So it's the ideal place to make sure the credentials are still valid.
Fortunately, each time the user navigates to a list, edit, create or show page, react-admin calls the `authProvider.checkAuth()` method. If this method returns a rejected Promise, react-admin calls `authProvider.logout()` and redirects the user to the login page. So it's the ideal place to make sure the credentials are still valid.

For instance, to check for the existence of the authentication data in local storage:

Expand Down
2 changes: 1 addition & 1 deletion docs/CreateEdit.md
Expand Up @@ -86,7 +86,7 @@ The `<Create>` and `<Edit>` components call the `dataProvider`, prepare the form

![post creation form](./img/create-view.png)

The `<Create>` component clones its child, and passes it an empty object `{}`) as `record` prop. It also passes a callback as `save` prop, which calls `dataProvider.create()`.
The `<Create>` component clones its child, and passes it an empty object `{}` as `record` prop. It also passes a callback as `save` prop, which calls `dataProvider.create()`.

![post edition form](./img/edit-view.png)

Expand Down
2 changes: 1 addition & 1 deletion docs/Fields.md
Expand Up @@ -218,7 +218,7 @@ import { DateField } from 'react-admin';
| ---------- | -------- | ------- | ------- | -------------------------------------------------------------------------------------------------------- |
| `locales` | Optional | string | '' | Override the browser locale in the date formatting. Passed as first argument to `Intl.DateTimeFormat()`. |
| `options` | Optional | Object | - | Date formatting options. Passed as second argument to `Intl.DateTimeFormat()`. |
| `showTime` | Optional | boolean | false | If true, show date and time. If false, show only date |
| `showTime` | Optional | boolean | `false` | If true, show date and time. If false, show only date |

`<DateField>` also accepts the [common field props](./Fields.md#common-field-props).

Expand Down
2 changes: 1 addition & 1 deletion docs/List.md
Expand Up @@ -1259,7 +1259,7 @@ const SongList: FC<Props> = props => (
);
```

For mode details about Saved Queries, check the [`ra-preferences` module](https://marmelab.com/ra-enterprise/modules/ra-preferences#savedquerieslist-and-filterwithsave-store-user-queries-in-preferences) in React-Admin Enterprise Edition.
For mode details about Saved Queries, check the [`ra-preferences` module](https://marmelab.com/ra-enterprise/modules/ra-preferences#savedquerieslist-and-filterwithsave-store-user-queries-in-preferences) in React-Admin Enterprise Edition.

### Building a Custom Filter

Expand Down
2 changes: 1 addition & 1 deletion packages/ra-core/src/auth/usePermissionsOptimized.ts
Expand Up @@ -46,7 +46,7 @@ const alreadyFetchedPermissions = { '{}': undefined };
* const PostDetail = props => {
* const { permissions } = usePermissionsOptimized();
* if (permissions !== 'editor') {
* return <Redirect to={`posts/${props.id}/show`} />
* return <Redirect to={`posts/${props.id}/show`} />
* } else {
* return <PostEdit {...props} />
* }
Expand Down
Expand Up @@ -106,7 +106,7 @@ describe('References data status', () => {
referenceRecord: null,
},
null,
'there is no error if there is a linked reference without data but the references fetch succeeds even empty'
'there is no error if there is a linked reference without data but the references fetch succeeds even empty'
);
test(
{
Expand Down Expand Up @@ -351,7 +351,7 @@ describe('References data status', () => {
referenceRecords: [],
},
null,
'there is no error if there is a linked reference without data but the references fetch succeeds even empty'
'there is no error if there is a linked reference without data but the references fetch succeeds even empty'
);
test(
{
Expand Down
2 changes: 1 addition & 1 deletion packages/ra-core/src/controller/useListParams.ts
Expand Up @@ -154,7 +154,7 @@ const useListParams = ({

// On mount, if the location includes params (for example from a link like
// the categories products on the demo), we need to persist them in the
// redux state as well so that we don't loose them after a redirection back
// redux state as well so that we don't lose them after a redirection back
// to the list
useEffect(() => {
if (Object.keys(queryFromLocation).length > 0) {
Expand Down
2 changes: 1 addition & 1 deletion packages/ra-core/src/util/FieldTitle.tsx
Expand Up @@ -35,7 +35,7 @@ export const FieldTitle: FunctionComponent<Props> = ({
);
};

// wat? TypeScript looses the displayName if we don't set it explicitly
// What? TypeScript loses the displayName if we don't set it explicitly
FieldTitle.displayName = 'FieldTitle';

export default memo(FieldTitle);
4 changes: 2 additions & 2 deletions packages/ra-core/src/util/TestContext.tsx
Expand Up @@ -42,15 +42,15 @@ const dataProviderDefaultResponse = { data: null };
* Pass custom store values as store prop
*
* @example
* // in an react testing-library test
* // in a react testing-library test
* const utils = render(
* <TestContext initialState={{ admin: { resources: { post: { data: { 1: {id: 1, title: 'foo' } } } } } }}>
* <Show {...defaultShowProps} />
* </TestContext>
* );
*
* @example
* // in an react testing-library test, using jest.
* // in a react testing-library test, using jest.
* const utils = render(
* <TestContext initialState={{ admin: { resources: { post: { data: { 1: {id: 1, title: 'foo' } } } } } }}>
* {({ store }) => {
Expand Down
2 changes: 1 addition & 1 deletion packages/ra-ui-materialui/src/field/ImageField.tsx
Expand Up @@ -96,7 +96,7 @@ const ImageField: FC<ImageFieldProps> = props => {
);
};

// wat? TypeScript looses the displayName if we don't set it explicitly
// What? TypeScript loses the displayName if we don't set it explicitly
ImageField.displayName = 'ImageField';

ImageField.defaultProps = {
Expand Down
2 changes: 1 addition & 1 deletion packages/ra-ui-materialui/src/field/NumberField.tsx
Expand Up @@ -84,7 +84,7 @@ export const NumberField: FC<NumberFieldProps> = memo<NumberFieldProps>(
}
);

// what? TypeScript looses the displayName if we don't set it explicitly
// what? TypeScript loses the displayName if we don't set it explicitly
NumberField.displayName = 'NumberField';

NumberField.defaultProps = {
Expand Down
2 changes: 1 addition & 1 deletion packages/ra-ui-materialui/src/field/TextField.tsx
Expand Up @@ -25,7 +25,7 @@ const TextField: FC<TextFieldProps> = memo<TextFieldProps>(
}
);

// what? TypeScript looses the displayName if we don't set it explicitly
// what? TypeScript loses the displayName if we don't set it explicitly
TextField.displayName = 'TextField';

TextField.defaultProps = {
Expand Down
2 changes: 1 addition & 1 deletion packages/ra-ui-materialui/src/form/FormInput.tsx
Expand Up @@ -98,7 +98,7 @@ export interface FormInputProps<
variant?: 'standard' | 'outlined' | 'filled';
}

// wat? TypeScript looses the displayName if we don't set it explicitly
// What? TypeScript loses the displayName if we don't set it explicitly
FormInput.displayName = 'FormInput';

export default FormInput;
2 changes: 1 addition & 1 deletion packages/ra-ui-materialui/src/layout/LinearProgress.tsx
Expand Up @@ -48,7 +48,7 @@ LinearProgress.propTypes = {
timeout: PropTypes.number,
};

// wat? TypeScript looses the displayName if we don't set it explicitly
// What? TypeScript loses the displayName if we don't set it explicitly
LinearProgress.displayName = 'LinearProgress';

export interface LinearProgressProps extends ProgressProps {
Expand Down
2 changes: 1 addition & 1 deletion packages/ra-ui-materialui/src/list/datagrid/Datagrid.tsx
Expand Up @@ -64,7 +64,7 @@ import { ClassesOverride } from '../../types';
* </ReferenceManyField>
*
*
* @example Usage it outside of a <List> or a <ReferenceManyField>.
* @example Usage outside of a <List> or a <ReferenceManyField>.
*
* const currentSort = { field: 'published_at', order: 'DESC' };
*
Expand Down
Expand Up @@ -38,7 +38,7 @@ export interface DatagridCellProps extends TableCellProps {
resource?: string;
}

// wat? TypeScript looses the displayName if we don't set it explicitly
// What? TypeScript loses the displayName if we don't set it explicitly
DatagridCell.displayName = 'DatagridCell';

export default DatagridCell;

0 comments on commit ea1f85c

Please sign in to comment.