|
@@ -5,7 +5,7 @@ import { Box, Typography } from "@mui/material";
|
|
import { ArrowDownward, ArrowUpward } from "@mui/icons-material";
|
|
import { ArrowDownward, ArrowUpward } from "@mui/icons-material";
|
|
import { listen } from "@tauri-apps/api/event";
|
|
import { listen } from "@tauri-apps/api/event";
|
|
import { ApiType } from "../../services/types";
|
|
import { ApiType } from "../../services/types";
|
|
-import { getInfomation } from "../../services/api";
|
|
|
|
|
|
+import { getInformation } from "../../services/api";
|
|
import { getVergeConfig } from "../../services/cmds";
|
|
import { getVergeConfig } from "../../services/cmds";
|
|
import { atomClashPort } from "../../services/states";
|
|
import { atomClashPort } from "../../services/states";
|
|
import TrafficGraph from "./traffic-graph";
|
|
import TrafficGraph from "./traffic-graph";
|
|
@@ -41,7 +41,7 @@ const LayoutTraffic = () => {
|
|
useEffect(() => {
|
|
useEffect(() => {
|
|
let ws: WebSocket | null = null;
|
|
let ws: WebSocket | null = null;
|
|
|
|
|
|
- getInfomation().then((result) => {
|
|
|
|
|
|
+ getInformation().then((result) => {
|
|
const { server = "", secret = "" } = result;
|
|
const { server = "", secret = "" } = result;
|
|
ws = new WebSocket(`ws://${server}/traffic?token=${secret}`);
|
|
ws = new WebSocket(`ws://${server}/traffic?token=${secret}`);
|
|
|
|
|