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} + + + ); diff --git a/bun.lockb b/bun.lockb index 3a206ee..d067936 100755 Binary files a/bun.lockb and b/bun.lockb differ diff --git a/components/Switch.tsx b/components/Switch.tsx index 4b0b0c4..acd68c6 100644 --- a/components/Switch.tsx +++ b/components/Switch.tsx @@ -1,7 +1,7 @@ "use client"; import { cn } from "@/lib/utils"; -import { motion } from "framer-motion"; +import { m } from "framer-motion"; import { useTranslations } from "next-intl"; import React, { createRef, useEffect, useRef } from "react"; @@ -74,7 +74,7 @@ export default function Switch({ )} > {nowTag === tag && ( - {currentTab === tab && ( - + import("./framer-lazy-feature").then((res) => res.default); + +export const MotionProvider = ({ children }: { children: React.ReactNode }) => { + return ( + + {children} + + ); +}; diff --git a/package.json b/package.json index c9ce57f..10fefd5 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "nezha-dash", - "version": "1.2.6", + "version": "1.2.7", "private": true, "scripts": { "dev": "next dev -p 3020", @@ -32,7 +32,7 @@ "framer-motion": "^12.0.0-alpha.1", "lucide-react": "^0.454.0", "luxon": "^3.5.0", - "next": "^15.0.2", + "next": "^15.0.3", "next-auth": "^5.0.0-beta.25", "next-intl": "^3.24.0", "next-runtime-env": "^3.2.2",