Skip to content

Commit

Permalink
refactor: setting device selection
Browse files Browse the repository at this point in the history
  • Loading branch information
up1512001 committed Jul 30, 2024
1 parent bcbe0d7 commit 6cf7214
Showing 1 changed file with 1 addition and 10 deletions.
11 changes: 1 addition & 10 deletions packages/editor/src/components/preview-dropdown/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -102,15 +102,6 @@ export default function PreviewDropdown( { forceIsAutosaveable, disabled } ) {
selectedChoice = choices[ 0 ];
}

/**
* Handles the selection of a device type.
*
* @param {string} value The device type.
*/
const onSelect = ( value ) => {
setDeviceType( value );
};

return (
<DropdownMenu
className="editor-preview-dropdown"
Expand All @@ -127,7 +118,7 @@ export default function PreviewDropdown( { forceIsAutosaveable, disabled } ) {
<MenuItemsChoice
choices={ choices }
value={ selectedChoice.value }
onSelect={ onSelect }
onSelect={ setDeviceType }
/>
</MenuGroup>
{ isTemplate && (
Expand Down

0 comments on commit 6cf7214

Please sign in to comment.