mirror of
https://github.com/Buriburizaem0n/nezha-dash-v1.git
synced 2026-09-19 09:40:14 +00:00
feat: refactor refresh
This commit is contained in:
@@ -19,7 +19,6 @@ import { ArrowDownIcon, ArrowUpIcon, ArrowsUpDownIcon, ChartBarSquareIcon, MapIc
|
||||
import { useQuery } from "@tanstack/react-query"
|
||||
import { useEffect, useState } from "react"
|
||||
import { useTranslation } from "react-i18next"
|
||||
import { toast } from "sonner"
|
||||
|
||||
export default function Servers() {
|
||||
const { t } = useTranslation()
|
||||
@@ -56,14 +55,6 @@ export default function Servers() {
|
||||
|
||||
const groupTabs = ["All", ...(groupData?.data?.map((item: ServerGroup) => item.group.name) || [])]
|
||||
|
||||
useEffect(() => {
|
||||
const hasShownToast = sessionStorage.getItem("websocket-connected-toast")
|
||||
if (connected && !hasShownToast) {
|
||||
toast.success(t("info.websocketConnected"))
|
||||
sessionStorage.setItem("websocket-connected-toast", "true")
|
||||
}
|
||||
}, [connected])
|
||||
|
||||
if (!connected && !lastMessage) {
|
||||
return (
|
||||
<div className="flex flex-col items-center min-h-96 justify-center ">
|
||||
|
||||
Reference in New Issue
Block a user