From 54ad381de3a3931005fea1a4baa01c8d9ec88672 Mon Sep 17 00:00:00 2001 From: Florian Dieminger Date: Wed, 3 Apr 2024 10:18:50 +0200 Subject: [PATCH] fix(playground): rename reset to clear (#10806) feat(playground): rename reset to clear Reset is confusing when coming from a live sample. So we rename it to clear for now. Resolves #10733 --- client/src/playground/index.tsx | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/client/src/playground/index.tsx b/client/src/playground/index.tsx index 44d6fc410457..535e1c51bb7f 100644 --- a/client/src/playground/index.tsx +++ b/client/src/playground/index.tsx @@ -158,7 +158,7 @@ export default function Playground() { window.removeEventListener("message", messageListener); }; }, [messageListener]); - const reset = async () => { + const clear = async () => { setSearchParams([], { replace: true }); setCodeSrc(undefined); htmlRef.current?.setContent(HTML_DEFAULT); @@ -167,10 +167,10 @@ export default function Playground() { updateWithEditorContent(); }; - const resetConfirm = async () => { - if (window.confirm("Do you really want to reset everything?")) { + const clearConfirm = async () => { + if (window.confirm("Do you really want to clear everything?")) { gleanClick(`${PLAYGROUND}: reset-click`); - await reset(); + await clear(); } }; @@ -287,11 +287,11 @@ export default function Playground() {