commenting unused lines
This commit is contained in:
parent
72b7cec9af
commit
2a717bfd1d
|
|
@ -5,24 +5,24 @@ import { motion } from "framer-motion";
|
|||
export default function AnimatedPage({ children, className }) {
|
||||
const location = useLocation();
|
||||
|
||||
const isNext = location.state && location.state.isNext;
|
||||
const isPrev = location.state && location.state.isPrev;
|
||||
const isGoingNext = location.state && location.state.isGoingNext;
|
||||
// const isNext = location.state && location.state.isNext;
|
||||
// const isPrev = location.state && location.state.isPrev;
|
||||
// const isGoingNext = location.state && location.state.isGoingNext;
|
||||
|
||||
function getAnimationParameters() {
|
||||
const animationParameters = { animate: { x: "0%", opacity: 1 } };
|
||||
if (isNext === true) {
|
||||
animationParameters.initial = { x: "50%", opacity: 0 };
|
||||
} else {
|
||||
animationParameters.initial = { x: "-50%", opacity: 0 };
|
||||
}
|
||||
if (isGoingNext === true) {
|
||||
animationParameters.exit = { x: "-50%", opacity: 0 };
|
||||
} else {
|
||||
animationParameters.exit = { x: "50%", opacity: 0 };
|
||||
}
|
||||
return animationParameters;
|
||||
}
|
||||
// function getAnimationParameters() {
|
||||
// const animationParameters = { animate: { x: "0%", opacity: 1 } };
|
||||
// if (isNext === true) {
|
||||
// animationParameters.initial = { x: "50%", opacity: 0 };
|
||||
// } else {
|
||||
// animationParameters.initial = { x: "-50%", opacity: 0 };
|
||||
// }
|
||||
// if (isGoingNext === true) {
|
||||
// animationParameters.exit = { x: "-50%", opacity: 0 };
|
||||
// } else {
|
||||
// animationParameters.exit = { x: "50%", opacity: 0 };
|
||||
// }
|
||||
// return animationParameters;
|
||||
// }
|
||||
// const animationParameters = getAnimationParameters();
|
||||
const animationParameters = {
|
||||
initial: { x: "50%", opacity: 0 },
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user