This commit is contained in:
Magdalena Markusik 2020-09-22 13:10:53 +02:00
parent c7124ffc41
commit c20c84da35

View file

@ -94,7 +94,7 @@ const SeoForm: React.FC<SeoFormProps> = props => {
const intl = useIntl(); const intl = useIntl();
const [expanded, setExpansionStatus] = React.useState(false); const [expanded, setExpansionStatus] = React.useState(false);
const toggleExpansion = () => setExpansionStatus(!expanded); const toggleExpansion = () => setExpansionStatus(!expanded);
const shouldDisplayHelperText = () => helperText && !expanded; const shouldDisplayHelperText = helperText && !expanded;
return ( return (
<Card> <Card>
@ -112,7 +112,7 @@ const SeoForm: React.FC<SeoFormProps> = props => {
} }
/> />
<CardContent> <CardContent>
{shouldDisplayHelperText() && ( {shouldDisplayHelperText && (
<Typography <Typography
className={classNames({ [classes.helperText]: expanded })} className={classNames({ [classes.helperText]: expanded })}
> >