@eventlook/sdk 1.7.4 → 1.7.5

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@eventlook/sdk",
3
- "version": "1.7.4",
3
+ "version": "1.7.5",
4
4
  "main": "dist/cjs/index.js",
5
5
  "module": "dist/esm/index.js",
6
6
  "types": "dist/types/index.d.ts",
@@ -121,7 +121,13 @@ const TicketSelection: React.FC<Props> = ({ event }) => {
121
121
  };
122
122
 
123
123
  const selectedTickets = async () => {
124
- const releases = await mutate();
124
+ // Use the cache we already have instead of revalidating here. A network
125
+ // revalidate refetches active-releases and returns the next wave as
126
+ // locked again, clobbering the local unlock below (mutate(..., false)).
127
+ // Since this runs in an effect keyed on [tickets, activeReleases], that
128
+ // re-locking re-fires the effect and we ping-pong, hammering
129
+ // /active-releases several times a second (and dropping the user's add).
130
+ const releases = activeReleases;
125
131
  const currentReleases = releases || activeReleases || [];
126
132
  const allFilled = tickets.filter((item) => !item.releaseId || !item.quantity);
127
133