refactor
This commit is contained in:
parent
c7124ffc41
commit
c20c84da35
1 changed files with 2 additions and 2 deletions
|
@ -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 })}
|
||||||
>
|
>
|
||||||
|
|
Loading…
Reference in a new issue