Skip to content

Commit a6c195c

Browse files
committed
Remove unused code
1 parent 441e8d1 commit a6c195c

File tree

1 file changed

+3
-9
lines changed

1 file changed

+3
-9
lines changed

apps/web/components/roadmap/hooks/useRoadmapItems.ts

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@ import {
33
IRoadmapCategory,
44
} from "@changes-page/supabase/types/page";
55
import { useState } from "react";
6-
import { useUserData } from "../../../utils/useUser";
76
import { createAuditLog } from "../../../utils/auditLog";
7+
import { useUserData } from "../../../utils/useUser";
88
import {
99
FormErrors,
1010
ItemForm,
@@ -67,12 +67,6 @@ export function useRoadmapItems({
6767
if (!confirm("Are you sure you want to delete this item?")) return;
6868

6969
try {
70-
// Get the item before deleting for audit log
71-
const itemToDelete = setBoardItems((prev) => {
72-
const item = prev.find((item) => item.id === itemId);
73-
return prev;
74-
});
75-
7670
const { error } = await supabase
7771
.from("roadmap_items")
7872
.delete()
@@ -152,9 +146,9 @@ export function useRoadmapItems({
152146
page_id: board.page_id,
153147
actor_id: user.id,
154148
action: `Updated Roadmap Item: ${data.title}`,
155-
changes: {
149+
changes: {
156150
old: editingItem,
157-
new: data
151+
new: data,
158152
},
159153
});
160154
}

0 commit comments

Comments
 (0)