Skip to content

Commit

Permalink
refactor to less changes
Browse files Browse the repository at this point in the history
  • Loading branch information
dratwas committed Nov 2, 2020
1 parent 0b3a196 commit 7d2b74d
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions packages/components/src/mobile/link-settings/index.native.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/**
* External dependencies
*/
import { Clipboard, Platform } from 'react-native';
import { Platform, Clipboard } from 'react-native';
/**
* WordPress dependencies
*/
Expand Down Expand Up @@ -131,6 +131,13 @@ function LinkSettings( {
} );
}, [ urlValue ] );

function onChangeURL( value ) {
if ( ! value && onEmptyURL ) {
onEmptyURL();
}
setUrlInputValue( value );
}

function onChangeLabel( value ) {
setLabelInputValue( value );
}
Expand Down Expand Up @@ -168,13 +175,6 @@ function LinkSettings( {
setLinkRelInputValue( value );
}

function onChangeURL( value ) {
if ( ! value && onEmptyURL ) {
onEmptyURL();
}
setUrlInputValue( value );
}

async function getURLFromClipboard() {
const clipboardText = await Clipboard.getString();

Expand Down

0 comments on commit 7d2b74d

Please sign in to comment.