Skip to content

Commit

Permalink
refactor: use lodash noop
Browse files Browse the repository at this point in the history
  • Loading branch information
Jon Waldstein committed Oct 12, 2023
1 parent 903c1d4 commit f2a9177
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import {PanelBody, PanelRow, TextControl} from '@wordpress/components';
import {__} from '@wordpress/i18n';
import {InspectorControls} from '@wordpress/block-editor';
import {noop} from 'lodash';
import {BlockEditProps} from '@wordpress/blocks';
import {FocusEventHandler, PropsWithChildren} from 'react';
import Label from '@givewp/form-builder/blocks/fields/settings/Label';
Expand Down Expand Up @@ -28,8 +29,6 @@ const SettingsInspectorControlPanel = ({title, children}: PropsWithChildren<Sett
);
};

const noop = () => {};

export default function FieldSettings({
attributes,
setAttributes,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import {TextControl} from '@wordpress/components';
import {__} from '@wordpress/i18n';
import {BlockEditProps} from '@wordpress/blocks';
import {noop} from 'lodash';
import {FocusEventHandler} from 'react';

type Props = {
Expand All @@ -10,8 +11,6 @@ type Props = {
onBlur?: FocusEventHandler<HTMLInputElement>;
};

const noop = () => {};

export default function Label({label, setAttributes, onBlur = noop}: Props) {
return (
<TextControl
Expand Down

0 comments on commit f2a9177

Please sign in to comment.