Skip to content

Commit

Permalink
Cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
simison committed Nov 22, 2024
1 parent ebbf802 commit 22f8a36
Showing 1 changed file with 1 addition and 10 deletions.
11 changes: 1 addition & 10 deletions projects/plugins/jetpack/extensions/blocks/subscriptions/edit.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ import {
RichText,
withColors,
withFontSizes,
useBlockProps,
__experimentalUseGradient as useGradient, // eslint-disable-line @wordpress/no-unsafe-wp-apis
} from '@wordpress/block-editor';
import { TextControl, Toolbar, withFallbackStyles } from '@wordpress/components';
Expand Down Expand Up @@ -71,8 +70,6 @@ export function SubscriptionEdit( props ) {
hasTierPlans,
} = props;

const blockProps = useBlockProps();

const validatedAttributes = getValidatedAttributes( metadata.attributes, attributes );
if ( ! isEqual( validatedAttributes, attributes ) ) {
setAttributes( validatedAttributes );
Expand Down Expand Up @@ -213,12 +210,6 @@ export function SubscriptionEdit( props ) {
setBorderColor( buttonBackgroundColor.color );
}, [ buttonBackgroundColor, previousButtonBackgroundColor, borderColor, setBorderColor ] );

const paidPlanLabel = paidPlanButtonText( hasTierPlans );

if ( isLoadingModules ) {
return <SubscriptionSkeletonLoader />;
}

return (
<>
<InspectorControls>
Expand Down Expand Up @@ -251,7 +242,7 @@ export function SubscriptionEdit( props ) {
/>
</InspectorControls>
<BlockControls>
<Toolbar label={ paidPlanLabel }>
<Toolbar label={ paidPlanButtonText( hasTierPlans ) }>
<GetAddPaidPlanButton context={ 'toolbar' } hasTierPlans={ hasTierPlans } />
</Toolbar>
</BlockControls>
Expand Down

0 comments on commit 22f8a36

Please sign in to comment.