@cstar.help/react 0.1.1 → 0.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.cjs CHANGED
@@ -231,9 +231,7 @@ function useMessages(ticketId) {
231
231
  try {
232
232
  const msg = await client.messages.send(ticketId, content);
233
233
  seenIdsRef.current.add(msg.id);
234
- setMessages(
235
- (prev) => prev.map((m) => m.id === optimistic.id ? msg : m)
236
- );
234
+ setMessages((prev) => prev.map((m) => m.id === optimistic.id ? msg : m));
237
235
  return msg;
238
236
  } catch (err) {
239
237
  setMessages((prev) => prev.filter((m) => m.id !== optimistic.id));
package/dist/index.js CHANGED
@@ -192,9 +192,7 @@ function useMessages(ticketId) {
192
192
  try {
193
193
  const msg = await client.messages.send(ticketId, content);
194
194
  seenIdsRef.current.add(msg.id);
195
- setMessages(
196
- (prev) => prev.map((m) => m.id === optimistic.id ? msg : m)
197
- );
195
+ setMessages((prev) => prev.map((m) => m.id === optimistic.id ? msg : m));
198
196
  return msg;
199
197
  } catch (err) {
200
198
  setMessages((prev) => prev.filter((m) => m.id !== optimistic.id));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cstar.help/react",
3
- "version": "0.1.1",
3
+ "version": "0.2.0",
4
4
  "description": "React hooks for the cStar customer support platform",
5
5
  "type": "module",
6
6
  "main": "./dist/index.cjs",
@@ -30,7 +30,7 @@
30
30
  },
31
31
  "peerDependencies": {
32
32
  "react": ">=18.0.0",
33
- "@cstar.help/js": ">=0.1.0"
33
+ "@cstar.help/js": ">=0.2.0"
34
34
  },
35
35
  "devDependencies": {
36
36
  "react": "^18.3.1",