diff --git a/packages/editor/src/components/post-url/panel.js b/packages/editor/src/components/post-url/panel.js index be32b40eaf1046..aca36566c04727 100644 --- a/packages/editor/src/components/post-url/panel.js +++ b/packages/editor/src/components/post-url/panel.js @@ -3,7 +3,11 @@ */ import { useMemo, useState } from '@wordpress/element'; import { useSelect } from '@wordpress/data'; -import { Dropdown, Button } from '@wordpress/components'; +import { + Dropdown, + Button, + __experimentalTruncate as Truncate, +} from '@wordpress/components'; import { __, sprintf } from '@wordpress/i18n'; import { safeDecodeURIComponent } from '@wordpress/url'; import { store as coreStore } from '@wordpress/core-data'; @@ -86,7 +90,9 @@ function PostURLToggle( { isOpen, onClick } ) { aria-label={ sprintf( __( 'Change link: %s' ), decodedSlug ) } onClick={ onClick } > - { isFrontPage ? postLink : <>/{ decodedSlug } } + + { isFrontPage ? postLink : `/${ decodedSlug }` } + ); }