Skip to content

Commit

Permalink
Cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
simison committed Nov 19, 2024
1 parent 6f7e16a commit 1501f5e
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 1501f5e

Please sign in to comment.