Skip to content

Commit

Permalink
Optimize framer motion
Browse files Browse the repository at this point in the history
  • Loading branch information
MikuroXina committed Jan 2, 2024
1 parent a6c6bde commit 579947c
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/app/providers.tsx
Original file line number Diff line number Diff line change
@@ -1,13 +1,16 @@
"use client";

import { LazyMotion, domAnimation } from "framer-motion";
import { ChakraProvider } from "@chakra-ui/react";
import { theme } from "./lib/theme";
import { yearContext } from "./lib/year-context";

export function Providers({ children }: { children: React.ReactNode }) {
return (
<yearContext.Provider value={new Date().getFullYear()}>
<ChakraProvider theme={theme}>{children}</ChakraProvider>
<LazyMotion features={domAnimation}>
<ChakraProvider theme={theme}>{children}</ChakraProvider>
</LazyMotion>
</yearContext.Provider>
);
}

0 comments on commit 579947c

Please sign in to comment.