Remove misleading helperText on SEO form (#3677)
This commit is contained in:
parent
b396c8e9a5
commit
78077f8220
2 changed files with 1 additions and 18 deletions
|
@ -7589,9 +7589,6 @@
|
|||
"context": "set expiry date selected label",
|
||||
"string": "Set gift card expiry date"
|
||||
},
|
||||
"s/sTT6": {
|
||||
"string": "If empty, the preview shows what will be autogenerated."
|
||||
},
|
||||
"s17U7u": {
|
||||
"context": "discount type",
|
||||
"string": "Percentage"
|
||||
|
|
|
@ -9,7 +9,7 @@ import { TextField } from "@material-ui/core";
|
|||
import { makeStyles } from "@saleor/macaw-ui";
|
||||
import { Box, Button, Input, Text } from "@saleor/macaw-ui/next";
|
||||
import React from "react";
|
||||
import { defineMessages, FormattedMessage, useIntl } from "react-intl";
|
||||
import { FormattedMessage, useIntl } from "react-intl";
|
||||
|
||||
import { DashboardCard } from "../Card";
|
||||
|
||||
|
@ -64,7 +64,6 @@ export const SeoForm: React.FC<SeoFormProps> = props => {
|
|||
disabled,
|
||||
errors = [],
|
||||
helperText,
|
||||
allowEmptySlug = false,
|
||||
loading,
|
||||
title,
|
||||
slug,
|
||||
|
@ -82,20 +81,9 @@ export const SeoForm: React.FC<SeoFormProps> = props => {
|
|||
|
||||
const shouldDisplayHelperText = helperText && !expanded;
|
||||
|
||||
const { seoFieldMessage } = defineMessages({
|
||||
seoFieldMessage: {
|
||||
id: "s/sTT6",
|
||||
defaultMessage: "If empty, the preview shows what will be autogenerated.",
|
||||
},
|
||||
});
|
||||
|
||||
const getSlugHelperMessage = () => {
|
||||
const error = !!getError(SeoField.slug);
|
||||
|
||||
if (allowEmptySlug && !error) {
|
||||
return intl.formatMessage(seoFieldMessage);
|
||||
}
|
||||
|
||||
return error ? getSlugErrorMessage() : "";
|
||||
};
|
||||
|
||||
|
@ -185,7 +173,6 @@ export const SeoForm: React.FC<SeoFormProps> = props => {
|
|||
onChange={onChange}
|
||||
maxLength={maxTitleLength}
|
||||
placeholder={titlePlaceholder}
|
||||
helperText={intl.formatMessage(seoFieldMessage)}
|
||||
label={
|
||||
<Box display="flex" gap={3}>
|
||||
<Box as="span">
|
||||
|
@ -235,7 +222,6 @@ export const SeoForm: React.FC<SeoFormProps> = props => {
|
|||
)}
|
||||
</div>
|
||||
}
|
||||
helperText={intl.formatMessage(seoFieldMessage)}
|
||||
InputProps={{
|
||||
inputProps: {
|
||||
maxLength: maxDescriptionLength,
|
||||
|
|
Loading…
Reference in a new issue