import { __ } from "@wordpress/i18n"; import { useBlockProps, InnerBlocks } from "@wordpress/block-editor"; import "./editor.scss"; import { PanelBody, Card, CardBody, CardHeader, TextControl, Button, __experimentalNumberControl as NumberControl, } from "@wordpress/components"; import { InspectorControls } from "@wordpress/block-editor"; export default function Edit({ attributes, setAttributes, ...props }) { const { year } = attributes; return ( <> { const n = parseInt(value, 10); setAttributes({ year: Number.isFinite(n) ? n : undefined }); }} />

{year}

); }