mirror of
https://github.com/block/buzz.git
synced 2026-11-27 11:41:21 +00:00
feat(reconnect): replace top banner with animated sidebar overlay (#1510)
This commit is contained in:
@@ -68,9 +68,16 @@ export function useSidebarRelayConnectionCard(
|
||||
const hasRelayUnreachableError = errorMessage
|
||||
? isRelayUnreachableError(errorMessage)
|
||||
: false;
|
||||
// True when the error is an application-level issue (e.g. auth rejection)
|
||||
// rather than a network-level relay-unreachable error. In this case, the
|
||||
// disconnected state should NOT trigger the reconnect card — the app shows
|
||||
// a dedicated error path instead.
|
||||
const hasNonUnreachableError =
|
||||
Boolean(errorMessage) && !hasRelayUnreachableError;
|
||||
const isRelayConnectionStateDegraded =
|
||||
relayConnectionState === "reconnecting" ||
|
||||
relayConnectionState === "stalled";
|
||||
relayConnectionState === "stalled" ||
|
||||
(relayConnectionState === "disconnected" && !hasNonUnreachableError);
|
||||
const isRelayConnectionConnected = relayConnectionState === "connected";
|
||||
const isRelayConnectionDisconnected = relayConnectionState === "disconnected";
|
||||
const [isDismissed, setIsDismissed] = React.useState(false);
|
||||
|
||||
Reference in New Issue
Block a user