Skip to content

Commit

Permalink
Merge pull request #4279 from alanpoulain/deprecated-dev-only
Browse files Browse the repository at this point in the history
Show deprecated messages only in dev
  • Loading branch information
fzaninotto authored Jan 21, 2020
2 parents fdf4c4c + ffe085c commit 66f68a5
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/react-admin/src/Admin.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ const Admin: FunctionComponent<AdminProps> = ({
theme,
title = 'React Admin',
}) => {
if (appLayout) {
if (appLayout && process.env.NODE_ENV !== 'production') {
console.warn(
'You are using deprecated prop "appLayout", it was replaced by "layout", see https://github.com/marmelab/react-admin/issues/2918'
);
Expand All @@ -114,7 +114,7 @@ const Admin: FunctionComponent<AdminProps> = ({
'You passed true to the loginPage prop. You must either pass false to disable it or a component class to customize it'
);
}
if (locale) {
if (locale && process.env.NODE_ENV !== 'production') {
console.warn(
'You are using deprecated prop "locale". You must now pass the initial locale to your i18nProvider'
);
Expand Down

0 comments on commit 66f68a5

Please sign in to comment.