Skip to content

Commit

Permalink
Site Logo: Remove unnecessary 'block-editor' store subscription (#57513)
Browse files Browse the repository at this point in the history
  • Loading branch information
Mamaduka authored Jan 3, 2024
1 parent bc0cfc6 commit a142fa4
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions packages/block-library/src/site-logo/edit.js
Original file line number Diff line number Diff line change
Expand Up @@ -412,7 +412,6 @@ export default function LogoEdit( {
siteIconId,
mediaItemData,
isRequestingMediaItem,
mediaUpload,
} = useSelect( ( select ) => {
const { canUser, getEntityRecord, getEditedEntityRecord } =
select( coreStore );
Expand Down Expand Up @@ -444,9 +443,9 @@ export default function LogoEdit( {
mediaItemData: mediaItem,
isRequestingMediaItem: _isRequestingMediaItem,
siteIconId: _siteIconId,
mediaUpload: select( blockEditorStore ).getSettings().mediaUpload,
};
}, [] );
const { getSettings } = useSelect( blockEditorStore );

const { editEntityRecord } = useDispatch( coreStore );

Expand Down Expand Up @@ -511,8 +510,8 @@ export default function LogoEdit( {
};

const onFilesDrop = ( filesList ) => {
mediaUpload( {
allowedTypes: [ 'image' ],
getSettings().mediaUpload( {
allowedTypes: ALLOWED_MEDIA_TYPES,
filesList,
onFileChange( [ image ] ) {
if ( isBlobURL( image?.url ) ) {
Expand Down

0 comments on commit a142fa4

Please sign in to comment.