Skip to content

Commit

Permalink
fix: ui update
Browse files Browse the repository at this point in the history
  • Loading branch information
potts99 committed Nov 14, 2024
1 parent 2eab42c commit a3ef4ec
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions apps/client/components/TicketDetails/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,7 @@ export default function Ticket() {
const res = await fetch(`/api/v1/ticket/status/update`, {
method: "PUT",
headers: {
"Content-Type": "application/json",
"Content-Type": "application/json",
Authorization: `Bearer ${token}`,
},
body: JSON.stringify({
Expand Down Expand Up @@ -226,7 +226,7 @@ export default function Ticket() {

if (!res.success) {
toast({
variant: "destructive",
variant: "destructive",
title: "Error",
description: res.message || "Failed to update visibility",
});
Expand All @@ -251,7 +251,7 @@ export default function Ticket() {
if (!res.success) {
toast({
variant: "destructive",
title: "Error",
title: "Error",
description: res.message || "Failed to update lock status",
});
return;
Expand Down Expand Up @@ -380,7 +380,7 @@ export default function Ticket() {
});
return;
}

if (res.users) {
setUsers(res.users);
}
Expand Down Expand Up @@ -410,7 +410,7 @@ export default function Ticket() {
});
return;
}

setAssignedEdit(false);
refetch();
}
Expand Down Expand Up @@ -504,7 +504,7 @@ export default function Ticket() {

// Loads the previously stored editor contents.
useEffect(() => {
if (status === "success") {
if (status === "success" && data && data.ticket) {
loadFromStorage().then((content) => {
if (typeof content === "object") {
setInitialContent(content);
Expand Down

0 comments on commit a3ef4ec

Please sign in to comment.