Skip to content

Commit

Permalink
Merge pull request stakwork#699 from saithsab877/fix-persist-toast-fe…
Browse files Browse the repository at this point in the history
…edback

Fix Toast Feedback Persistence in Ticket Editor
  • Loading branch information
humansinstitute authored Dec 3, 2024
2 parents 5803ab0 + 73d596b commit bec95fa
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 bec95fa

Please sign in to comment.