Phase 3 and 4

This commit is contained in:
2026-05-04 14:23:10 -05:00
parent 056bd27f89
commit 884043cf22
24 changed files with 1847 additions and 175 deletions
+3 -1
View File
@@ -5,6 +5,7 @@
*/
import { useState, useEffect } from "react";
import { getSocket } from "../lib/socket.js";
import { useConnectivityStore } from "../store/connectivity.js";
import type { AuctionItem, Bid, ItemState } from "@storybid/shared";
export interface LiveAuctionState {
@@ -16,6 +17,7 @@ export interface LiveAuctionState {
}
export function useLiveAuction(eventId: string) {
const socketVersion = useConnectivityStore((s) => s.socketVersion);
const [state, setState] = useState<LiveAuctionState>({
currentItem: null,
currentBid: null,
@@ -74,7 +76,7 @@ export function useLiveAuction(eventId: string) {
socket.off("item_state_changed");
socket.off("item_sold");
};
}, [eventId]);
}, [eventId, socketVersion]);
const placeBid = (itemId: string, amount: number, deviceId: string, clientSeq: number) => {
const socket = getSocket();