Skip to content

Commit

Permalink
Fix: Ensure toast feedback persists on multiple updates
Browse files Browse the repository at this point in the history
  • Loading branch information
saithsab877 committed Dec 3, 2024
1 parent 5803ab0 commit 73d596b
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/components/common/TicketEditor/TicketEditor.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ const TicketEditor = ({ ticketData }: TicketEditorProps) => {
const addUpdateSuccessToast = () => {
setToasts([
{
id: '3',
id: `${Date.now()}-success`,
title: 'Hive',
color: 'success',
text: 'Updates Saved!'
Expand All @@ -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!'
Expand Down Expand Up @@ -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!"
Expand All @@ -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'
Expand Down

0 comments on commit 73d596b

Please sign in to comment.