chore: sync master into next branch

This commit is contained in:
afc163 2022-05-11 16:00:22 +08:00
parent 84a969e5e0
commit 2842524850
2 changed files with 4 additions and 4 deletions

View File

@ -18,7 +18,7 @@ import type {
TypeOpen,
} from './interface';
import { getMotion, wrapPromiseFn } from './util';
import devWarning from '../_util/devWarning';
import warning from '../_util/warning';
const TypeIcon = {
info: <InfoCircleFilled />,
@ -120,7 +120,7 @@ export function useInternalMessage(
// >>> Open
const open = (config: ArgsProps): MessageType => {
if (!holderRef.current) {
devWarning(
warning(
false,
'Message',
'You are calling notice in render which will break in React 18 concurrent mode. Please trigger in effect instead.',

View File

@ -15,7 +15,7 @@ import type {
NotificationConfig,
} from './interface';
import { getPlacementStyle, getMotion } from './util';
import devWarning from '../_util/devWarning';
import warning from '../_util/warning';
const typeToIcon = {
success: CheckCircleOutlined,
@ -106,7 +106,7 @@ export function useInternalNotification(
// >>> Open
const open = (config: ArgsProps) => {
if (!holderRef.current) {
devWarning(
warning(
false,
'Notification',
'You are calling notice in render which will break in React 18 concurrent mode. Please trigger in effect instead.',