Prettified Code!

This commit is contained in:
gabek
2021-05-23 06:28:21 +00:00
committed by GitHub Action
parent d0eb1446f3
commit 5371559c74
4 changed files with 19 additions and 18 deletions

View File

@@ -184,7 +184,9 @@ export default function EditSocialLinks() {
<div className="social-handle-cell">
<p className="option-label">
<strong>{platform}</strong>
<span className="handle-url" title={url}>{url}</span>
<span className="handle-url" title={url}>
{url}
</span>
</p>
</div>
);
@@ -195,11 +197,13 @@ export default function EditSocialLinks() {
return (
<div className="social-handle-cell">
<span className="option-icon">
<img src={ iconUrl } alt="" className="option-icon" />
<img src={iconUrl} alt="" className="option-icon" />
</span>
<p className="option-label">
<strong>{platformName}</strong>
<span className="handle-url" title={url}>{url}</span>
<span className="handle-url" title={url}>
{url}
</span>
</p>
</div>
);

View File

@@ -71,7 +71,10 @@ export default function TextFieldWithSubmit(props: TextFieldWithSubmitProps) {
// if field is required but value is empty, or equals initial value, then don't show submit/update button. otherwise clear out any result messaging and display button.
const handleChange = ({ fieldName: changedFieldName, value: changedValue }: UpdateArgs) => {
if (onChange) {
onChange({ fieldName: changedFieldName, value: useTrim ? changedValue.trim() : changedValue });
onChange({
fieldName: changedFieldName,
value: useTrim ? changedValue.trim() : changedValue,
});
}
};