feat: prettier
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
import {forwardRef, useContext, useRef} from "react";
|
||||
import {getRouterContext, Outlet} from "@tanstack/react-router";
|
||||
import {motion, useIsPresent} from "framer-motion";
|
||||
import {cloneDeep} from "lodash";
|
||||
import { forwardRef, useContext, useRef } from "react";
|
||||
import { getRouterContext, Outlet } from "@tanstack/react-router";
|
||||
import { motion, useIsPresent } from "framer-motion";
|
||||
import { cloneDeep } from "lodash";
|
||||
|
||||
const AnimatedOutlet = forwardRef<HTMLDivElement>((_, ref) => {
|
||||
const RouterContext = getRouterContext();
|
||||
@@ -17,26 +17,24 @@ const AnimatedOutlet = forwardRef<HTMLDivElement>((_, ref) => {
|
||||
}
|
||||
|
||||
return (
|
||||
<motion.div ref={ref}
|
||||
initial={{x: "-100%"}}
|
||||
animate={{
|
||||
x: 0,
|
||||
transform: "",
|
||||
transitionEnd: {
|
||||
transform: "none"
|
||||
}
|
||||
}}
|
||||
|
||||
transition={{
|
||||
duration: 0.4,
|
||||
ease: "circInOut",
|
||||
}}
|
||||
|
||||
>
|
||||
<motion.div
|
||||
ref={ref}
|
||||
initial={{ x: "-100%" }}
|
||||
animate={{
|
||||
x: 0,
|
||||
transform: "",
|
||||
transitionEnd: {
|
||||
transform: "none",
|
||||
},
|
||||
}}
|
||||
transition={{
|
||||
duration: 0.4,
|
||||
ease: "circInOut",
|
||||
}}>
|
||||
<RouterContext.Provider value={renderedContext.current}>
|
||||
<Outlet/>
|
||||
<Outlet />
|
||||
</RouterContext.Provider>
|
||||
</motion.div>
|
||||
);
|
||||
});
|
||||
export default AnimatedOutlet
|
||||
export default AnimatedOutlet;
|
||||
|
||||
Reference in New Issue
Block a user