From 4116e12237d8cc1a151bc9b278cbfffe2e86f196 Mon Sep 17 00:00:00 2001
From: hamster1963 <1410514192@qq.com>
Date: Fri, 8 Nov 2024 11:21:19 +0800
Subject: [PATCH 1/3] perf: use LazyMotion
---
app/layout.tsx | 23 +++++++++++++----------
components/Switch.tsx | 4 ++--
components/TabSwitch.tsx | 4 ++--
components/motion/framer-lazy-feature.ts | 1 +
components/motion/motion-provider.tsx | 14 ++++++++++++++
5 files changed, 32 insertions(+), 14 deletions(-)
create mode 100644 components/motion/framer-lazy-feature.ts
create mode 100644 components/motion/motion-provider.tsx
diff --git a/app/layout.tsx b/app/layout.tsx
index 912cdeb..61e8806 100644
--- a/app/layout.tsx
+++ b/app/layout.tsx
@@ -1,4 +1,5 @@
// @auto-i18n-check. Please do not delete the line.
+import { MotionProvider } from "@/components/motion/motion-provider";
import getEnv from "@/lib/env-entry";
import { cn } from "@/lib/utils";
import "@/styles/globals.css";
@@ -64,16 +65,18 @@ export default async function LocaleLayout({
fontSans.variable,
)}
>
-
-
- {children}
-
-
+
+
+
+ {children}
+
+
+