(file: string, id: string)
| 117 | } |
| 118 | |
| 119 | const remove = (file: string, id: string) => { |
| 120 | batch(() => { |
| 121 | setStore("comments", file, (items) => (items ?? []).filter((item) => item.id !== id)) |
| 122 | setFocus((current) => (current?.file === file && current.id === id ? null : current)) |
| 123 | }) |
| 124 | } |
| 125 | |
| 126 | const update = (file: string, id: string, comment: string) => { |
| 127 | setStore("comments", file, (items) => |