fix: edit/del template will trigger set template

This commit is contained in:
2023-12-22 13:02:51 +08:00
parent 8542a44817
commit fe1a796daa

View File

@@ -622,7 +622,10 @@ export default function ChatBOX(props: {
<hr className="mt-2" />
<span className="flex justify-between">
<button
onClick={() => {
onClick={(event) => {
// prevent triggert other event
event.stopPropagation();
const name = prompt("Give template a name");
if (!name) {
return;
@@ -634,7 +637,10 @@ export default function ChatBOX(props: {
🖋
</button>
<button
onClick={() => {
onClick={(event) => {
// prevent triggert other event
event.stopPropagation();
if (!confirm("Are you sure to delete this template?")) {
return;
}