From f3de20fcb9ec1f07343ca4425ac467a0d2442773 Mon Sep 17 00:00:00 2001 From: Robert Anderson Date: Fri, 1 Jul 2022 15:18:13 +1000 Subject: [PATCH] Don't show 'View post' if slug is not editable --- packages/editor/src/components/post-url/index.js | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/packages/editor/src/components/post-url/index.js b/packages/editor/src/components/post-url/index.js index f4d0529b9c668d..32dfbbc63706f9 100644 --- a/packages/editor/src/components/post-url/index.js +++ b/packages/editor/src/components/post-url/index.js @@ -89,9 +89,11 @@ export default function PostURL( { onClose } ) { } } /> ) } -

- { viewPostLabel ?? __( 'View post' ) } -

+ { isEditable && ( +

+ { viewPostLabel ?? __( 'View post' ) } +

+ ) }