mirror of
https://github.com/hexastack/hexabot
synced 2025-06-26 18:27:28 +00:00
fix: refactor css
This commit is contained in:
parent
917d497b89
commit
d62c2b5aff
@ -38,3 +38,14 @@
|
|||||||
opacity: 1;
|
opacity: 1;
|
||||||
transition: 0s;
|
transition: 0s;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.sc-chat--attempt-reconnect {
|
||||||
|
width: 100%;
|
||||||
|
height: 100%;
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
justify-content: center;
|
||||||
|
align-items: center;
|
||||||
|
text-align: center;
|
||||||
|
gap: 1rem;
|
||||||
|
}
|
||||||
|
@ -33,18 +33,7 @@ const ConnectionLost: React.FC = () => {
|
|||||||
style={{ backgroundColor: colors.messageList.bg }}
|
style={{ backgroundColor: colors.messageList.bg }}
|
||||||
>
|
>
|
||||||
{loading ? (
|
{loading ? (
|
||||||
<div
|
<div className="sc-chat--attempt-reconnect">
|
||||||
style={{
|
|
||||||
width: "100%",
|
|
||||||
height: "100%",
|
|
||||||
display: "flex",
|
|
||||||
flexDirection: "column",
|
|
||||||
justifyContent: "center",
|
|
||||||
alignItems: "center",
|
|
||||||
textAlign: "center",
|
|
||||||
gap: "1rem",
|
|
||||||
}}
|
|
||||||
>
|
|
||||||
<h3>{t("messages.attempting_reconnect")}</h3>
|
<h3>{t("messages.attempting_reconnect")}</h3>
|
||||||
<LoadingIcon color={colors.button.text} />
|
<LoadingIcon color={colors.button.text} />
|
||||||
</div>
|
</div>
|
||||||
|
@ -416,9 +416,9 @@ const ChatProvider: React.FC<{
|
|||||||
|
|
||||||
return () => {
|
return () => {
|
||||||
socketCtx.socket.io.off("reconnect", reSubscribe);
|
socketCtx.socket.io.off("reconnect", reSubscribe);
|
||||||
socketCtx.socket.io.on("close", endConnection);
|
socketCtx.socket.io.off("close", endConnection);
|
||||||
socketCtx.socket.io.on("reconnect_error", endConnection);
|
socketCtx.socket.io.off("reconnect_error", endConnection);
|
||||||
socketCtx.socket.io.on("reconnect_failed", endConnection);
|
socketCtx.socket.io.off("reconnect_failed", endConnection);
|
||||||
};
|
};
|
||||||
// eslint-disable-next-line react-hooks/exhaustive-deps
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
||||||
}, []);
|
}, []);
|
||||||
|
Loading…
Reference in New Issue
Block a user