fix(form): fix useFormItemStatus get access to window error when sever-side-rendering (#40977)

* fix(form): fix `useFormItemStatus` get access to window error when sever-side-rendering

* fix(form): use official doc in `useFormItemStatus`

fix(form): replace the string literal by official doc in `useFormItemStatus` warning message.

* fix(form): use official doc in  warning

- Remove unnecessary client check
- Use official i18n doc href.
This commit is contained in:
zahgboat 2023-03-01 11:52:37 +08:00 committed by GitHub
parent e56184aaa3
commit 849dd97456
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -13,7 +13,7 @@ const useFormItemStatus: UseFormItemStatus = () => {
warning(
status !== undefined,
'Form.Item',
`Form.Item.useStatus should be used under Form.Item component. For more information: ${window.location.protocol}//${window.location.host}/components/form-cn/#Form.Item.useStatus`,
'Form.Item.useStatus should be used under Form.Item component. For more information: https://u.ant.design/form-item-usestatus',
);
return { status };