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/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} + + ); +};