From 73d596bb9dd89d85a009c68c6800da3ba90fe7e9 Mon Sep 17 00:00:00 2001 From: saithsab877 Date: Tue, 3 Dec 2024 12:16:27 +0500 Subject: [PATCH] Fix: Ensure toast feedback persists on multiple updates --- src/components/common/TicketEditor/TicketEditor.tsx | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/components/common/TicketEditor/TicketEditor.tsx b/src/components/common/TicketEditor/TicketEditor.tsx index 5e58fb46..787e0a65 100644 --- a/src/components/common/TicketEditor/TicketEditor.tsx +++ b/src/components/common/TicketEditor/TicketEditor.tsx @@ -52,7 +52,7 @@ const TicketEditor = ({ ticketData }: TicketEditorProps) => { const addUpdateSuccessToast = () => { setToasts([ { - id: '3', + id: `${Date.now()}-success`, title: 'Hive', color: 'success', text: 'Updates Saved!' @@ -63,7 +63,7 @@ const TicketEditor = ({ ticketData }: TicketEditorProps) => { const addUpdateErrorToast = () => { setToasts([ { - id: '4', + id: `${Date.now()}-error`, title: 'Hive', color: 'danger', text: 'We had an issue, try again!' @@ -96,7 +96,7 @@ const TicketEditor = ({ ticketData }: TicketEditorProps) => { const addSuccessToast = () => { setToasts([ { - id: '1', + id: `${Date.now()}-ticket-success`, title: 'Ticket Builder', color: 'success', text: "Success, I'll rewrite your ticket now!" @@ -107,7 +107,7 @@ const TicketEditor = ({ ticketData }: TicketEditorProps) => { const addErrorToast = () => { setToasts([ { - id: '2', + id: `${Date.now()}-ticket-error`, title: 'Ticket Builder', color: 'danger', text: 'Sorry, there appears to be a problem'