mirror of
https://github.com/woodchen-ink/nezha-dash-v1.git
synced 2025-07-18 09:31:55 +08:00
fix: use lastMessage
This commit is contained in:
parent
8248d11ad0
commit
249b699dfb
@ -52,7 +52,7 @@ type connectChartData = {
|
||||
export default function ServerDetailChart({ server_id }: { server_id: string }) {
|
||||
const { lastMessage, connected } = useWebSocketContext()
|
||||
|
||||
if (!connected) {
|
||||
if (!connected || !lastMessage) {
|
||||
return <ServerDetailChartLoading />
|
||||
}
|
||||
|
||||
|
@ -18,7 +18,7 @@ export default function ServerDetailOverview({ server_id }: { server_id: string
|
||||
|
||||
const { lastMessage, connected } = useWebSocketContext()
|
||||
|
||||
if (!connected) {
|
||||
if (!connected || !lastMessage) {
|
||||
return <ServerDetailLoading />
|
||||
}
|
||||
|
||||
|
@ -64,7 +64,7 @@ export default function Servers() {
|
||||
}
|
||||
}, [connected])
|
||||
|
||||
if (!connected) {
|
||||
if (!connected && !lastMessage) {
|
||||
return (
|
||||
<div className="flex flex-col items-center min-h-96 justify-center ">
|
||||
<div className="font-semibold flex items-center gap-2 text-sm">
|
||||
|
Loading…
x
Reference in New Issue
Block a user