Skip to content

Commit a3ef4ec

Browse files
committed
fix: ui update
1 parent 2eab42c commit a3ef4ec

File tree

1 file changed

+6
-6
lines changed
  • apps/client/components/TicketDetails

1 file changed

+6
-6
lines changed

apps/client/components/TicketDetails/index.tsx

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -189,7 +189,7 @@ export default function Ticket() {
189189
const res = await fetch(`/api/v1/ticket/status/update`, {
190190
method: "PUT",
191191
headers: {
192-
"Content-Type": "application/json",
192+
"Content-Type": "application/json",
193193
Authorization: `Bearer ${token}`,
194194
},
195195
body: JSON.stringify({
@@ -226,7 +226,7 @@ export default function Ticket() {
226226

227227
if (!res.success) {
228228
toast({
229-
variant: "destructive",
229+
variant: "destructive",
230230
title: "Error",
231231
description: res.message || "Failed to update visibility",
232232
});
@@ -251,7 +251,7 @@ export default function Ticket() {
251251
if (!res.success) {
252252
toast({
253253
variant: "destructive",
254-
title: "Error",
254+
title: "Error",
255255
description: res.message || "Failed to update lock status",
256256
});
257257
return;
@@ -380,7 +380,7 @@ export default function Ticket() {
380380
});
381381
return;
382382
}
383-
383+
384384
if (res.users) {
385385
setUsers(res.users);
386386
}
@@ -410,7 +410,7 @@ export default function Ticket() {
410410
});
411411
return;
412412
}
413-
413+
414414
setAssignedEdit(false);
415415
refetch();
416416
}
@@ -504,7 +504,7 @@ export default function Ticket() {
504504

505505
// Loads the previously stored editor contents.
506506
useEffect(() => {
507-
if (status === "success") {
507+
if (status === "success" && data && data.ticket) {
508508
loadFromStorage().then((content) => {
509509
if (typeof content === "object") {
510510
setInitialContent(content);

0 commit comments

Comments
 (0)