PluginProbe
Yatra – Travel Booking & Tour Operator Software / 3.0.13
Yatra – Travel Booking & Tour Operator Software v3.0.13
3.0.16 3.0.15 3.0.14 3.0.14.1 3.0.14.2 3.0.12 3.0.13 3.0.11 3.0.10 3.0.9 3.0.8 3.0.7 3.0.6 3.0.5 3.0.5.1 3.0.4 3.0.3 3.0.2.9 3.0.2.7 3.0.2.8 3.0.2.6 trunk 1.0.0 2.0.0 2.0.1 All 84 releases
yatra / resources / js / blocks / tour / index.tsx

index.tsx in Yatra – Travel Booking & Tour Operator Software 3.0.13, at resources/js/blocks/tour/index.tsx

27 lines 692 B
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 import {
2 getBlockType,
3 registerBlockType,
4 unregisterBlockType,
5 type BlockConfiguration,
6 } from "@wordpress/blocks";
7 import Edit from "./edit";
8 import blockMetadata from "./block.json";
9
10 // Merge full block.json so keywords, supports.inserter, and description stay in sync for the inserter/search.
11 const {
12 $schema: _$schema,
13 editorScript: _$editorScript,
14 ...metadata
15 } = blockMetadata;
16
17 // If a stale registration exists (no edit / partial merge), replace it so the inserter works.
18 if (getBlockType(metadata.name)) {
19 unregisterBlockType(metadata.name);
20 }
21
22 registerBlockType(metadata.name, {
23 ...metadata,
24 edit: Edit,
25 save: () => null,
26 } as unknown as BlockConfiguration);
27