fix: edit/del template will trigger set template
This commit is contained in:
@@ -622,7 +622,10 @@ export default function ChatBOX(props: {
|
|||||||
<hr className="mt-2" />
|
<hr className="mt-2" />
|
||||||
<span className="flex justify-between">
|
<span className="flex justify-between">
|
||||||
<button
|
<button
|
||||||
onClick={() => {
|
onClick={(event) => {
|
||||||
|
// prevent triggert other event
|
||||||
|
event.stopPropagation();
|
||||||
|
|
||||||
const name = prompt("Give template a name");
|
const name = prompt("Give template a name");
|
||||||
if (!name) {
|
if (!name) {
|
||||||
return;
|
return;
|
||||||
@@ -634,7 +637,10 @@ export default function ChatBOX(props: {
|
|||||||
🖋
|
🖋
|
||||||
</button>
|
</button>
|
||||||
<button
|
<button
|
||||||
onClick={() => {
|
onClick={(event) => {
|
||||||
|
// prevent triggert other event
|
||||||
|
event.stopPropagation();
|
||||||
|
|
||||||
if (!confirm("Are you sure to delete this template?")) {
|
if (!confirm("Are you sure to delete this template?")) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user