From dd11345e09c3774f386a25e90aa63964cbac2796 Mon Sep 17 00:00:00 2001 From: Haileyesus Date: Mon, 23 Feb 2026 10:16:03 +0300 Subject: [PATCH] fix: reset copy state after copying in MarkdownCodeBlock component There were 2 issues. The copy state was not being reset after copying, which caused the "Copied!" message to persist indefinitely. The return value from the copy function was not being used to determine if the copy was successful. Even on false(i.e. copy unsuccessful), the user would see a success message. --- .../view/subcomponents/markdown/MarkdownCodeBlock.tsx | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/components/code-editor/view/subcomponents/markdown/MarkdownCodeBlock.tsx b/src/components/code-editor/view/subcomponents/markdown/MarkdownCodeBlock.tsx index 3dfe615..4bd905c 100644 --- a/src/components/code-editor/view/subcomponents/markdown/MarkdownCodeBlock.tsx +++ b/src/components/code-editor/view/subcomponents/markdown/MarkdownCodeBlock.tsx @@ -43,7 +43,13 @@ export default function MarkdownCodeBlock({