Skip to content

Commit d07dfda

Browse files
committed
[not verified] Revert "OpenTable & Calendly: Improve save functions by wrappi… (#14793)
This reverts commit 18d1f9c.
1 parent c73dbb1 commit d07dfda

File tree

2 files changed

+13
-38
lines changed

2 files changed

+13
-38
lines changed

extensions/blocks/calendly/index.js

Lines changed: 6 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -19,11 +19,6 @@ import './editor.scss';
1919

2020
export const name = 'calendly';
2121
export const title = __( 'Calendly', 'jetpack' );
22-
const supports = {
23-
align: true,
24-
alignWide: false,
25-
html: false,
26-
};
2722
export const settings = {
2823
title,
2924
description: __( 'Embed a calendar for customers to schedule appointments', 'jetpack' ),
@@ -34,13 +29,13 @@ export const settings = {
3429
__( 'schedule', 'jetpack' ),
3530
__( 'appointments', 'jetpack' ),
3631
],
37-
supports,
32+
supports: {
33+
align: true,
34+
alignWide: false,
35+
html: false,
36+
},
3837
edit,
39-
save: ( { attributes: { url } } ) => (
40-
<div>
41-
<a href={ url }>{ url }</a>
42-
</div>
43-
),
38+
save: ( { attributes: { url } } ) => <a href={ url }>{ url }</a>,
4439
attributes,
4540
example: {
4641
attributes: {
@@ -62,10 +57,4 @@ export const settings = {
6257
},
6358
],
6459
},
65-
deprecated: [
66-
{
67-
attributes,
68-
save: ( { attributes: { url } } ) => <a href={ url }>{ url }</a>,
69-
},
70-
],
7160
};

extensions/blocks/opentable/index.js

Lines changed: 7 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -20,10 +20,7 @@ import './view.scss';
2020
export const name = 'opentable';
2121
export const title = __( 'OpenTable', 'jetpack' );
2222
import { getAttributesFromEmbedCode, restRefRegex, ridRegex } from './utils';
23-
const supports = {
24-
align: true,
25-
html: false,
26-
};
23+
2724
export const settings = {
2825
title,
2926
description: __( 'Allow visitors to book a reservation with OpenTable', 'jetpack' ),
@@ -34,16 +31,19 @@ export const settings = {
3431
__( 'reservation', 'jetpack' ),
3532
__( 'restaurant', 'jetpack' ),
3633
],
37-
supports,
34+
supports: {
35+
align: true,
36+
html: false,
37+
},
3838
edit,
3939
save: ( { attributes: { rid } } ) => (
40-
<div>
40+
<>
4141
{ rid.map( restaurantId => (
4242
<a href={ `https://www.opentable.com/restref/client/?rid=${ restaurantId }` }>
4343
{ `https://www.opentable.com/restref/client/?rid=${ restaurantId }` }
4444
</a>
4545
) ) }
46-
</div>
46+
</>
4747
),
4848
attributes: defaultAttributes,
4949
example: {
@@ -71,18 +71,4 @@ export const settings = {
7171
},
7272
],
7373
},
74-
deprecated: [
75-
{
76-
attributes: defaultAttributes,
77-
save: ( { attributes: { rid } } ) => (
78-
<>
79-
{ rid.map( restaurantId => (
80-
<a href={ `https://www.opentable.com/restref/client/?rid=${ restaurantId }` }>
81-
{ `https://www.opentable.com/restref/client/?rid=${ restaurantId }` }
82-
</a>
83-
) ) }
84-
</>
85-
),
86-
},
87-
],
8874
};

0 commit comments

Comments
 (0)