From a2e90b7d215dc614635b72e55aef38a8e00e29c8 Mon Sep 17 00:00:00 2001
From: Tunglies <77394545+Tunglies@users.noreply.github.com>
Date: Wed, 29 Oct 2025 05:24:24 +0800
Subject: [PATCH] perf(main): remove unnecessary React.mode
This caused to #1afaa4c
---
src/main.tsx | 21 +++++++++------------
src/pages/_layout.tsx | 2 +-
2 files changed, 10 insertions(+), 13 deletions(-)
diff --git a/src/main.tsx b/src/main.tsx
index 62e3c4e2..8dc62a29 100644
--- a/src/main.tsx
+++ b/src/main.tsx
@@ -4,7 +4,6 @@ import "./assets/styles/index.scss";
import { ResizeObserver } from "@juggle/resize-observer";
import { ComposeContextProvider } from "foxact/compose-context-provider";
-import React from "react";
import { createRoot } from "react-dom/client";
import { RouterProvider } from "react-router";
import { MihomoWebSocket } from "tauri-plugin-mihomo-api";
@@ -56,17 +55,15 @@ const initializeApp = () => {
const root = createRoot(container);
root.render(
-
-
-
-
-
-
-
-
-
-
- ,
+
+
+
+
+
+
+
+
+ ,
);
};
diff --git a/src/pages/_layout.tsx b/src/pages/_layout.tsx
index 4111e3ef..cdfbafb3 100644
--- a/src/pages/_layout.tsx
+++ b/src/pages/_layout.tsx
@@ -25,6 +25,7 @@ import {
} from "@mui/material";
import dayjs from "dayjs";
import relativeTime from "dayjs/plugin/relativeTime";
+import type { CSSProperties } from "react";
import {
useCallback,
useEffect,
@@ -33,7 +34,6 @@ import {
useRef,
useState,
} from "react";
-import type { CSSProperties } from "react";
import { useTranslation } from "react-i18next";
import { Outlet, useNavigate } from "react-router";
import { SWRConfig } from "swr";