prevStateRef was initialized with current state, so when the page loaded with an already-idle conflict agent, the transition guard was immediately false and dismiss() never fired. Initialize with null instead.
prevStateRef was initialized with current state, so when the page loaded with an already-idle conflict agent, the transition guard was immediately false and dismiss() never fired. Initialize with null instead.