From 3b9b5e038ea4ba57177176f3249026f1b9b10c3f Mon Sep 17 00:00:00 2001 From: resqiar Date: Mon, 23 Aug 2021 12:19:34 +0700 Subject: [PATCH] fix(dikweb): fix broken broken copy URL --- dikweb/components/feed/FeedMoreItem.tsx | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/dikweb/components/feed/FeedMoreItem.tsx b/dikweb/components/feed/FeedMoreItem.tsx index 4f928e7..54686e0 100644 --- a/dikweb/components/feed/FeedMoreItem.tsx +++ b/dikweb/components/feed/FeedMoreItem.tsx @@ -110,7 +110,11 @@ export default function FeedMoreItem(props: Props) { const handleCopyClick = () => { // write/save the url to clipboard navigator.clipboard.writeText( - `${process.env.NEXT_PUBLIC_FRONTEND_HOST}/${props.postAuthorUsername}/${props.postId}` + `${ + process.env.NEXT_PUBLIC_FRONTEND_HOST + }/${props.postAuthorUsername.replaceAll(' ', '%20')}/${ + props.postId + }` ) // close menu and trigger Snackbar