mirror of
https://github.com/lukevella/rallly.git
synced 2025-06-01 10:11:50 +02:00
🔥 Remove page animations
This commit is contained in:
parent
66361013b4
commit
ecd63aea48
1 changed files with 2 additions and 15 deletions
|
@ -1,5 +1,4 @@
|
|||
import { AnimatePresence, domMax, LazyMotion, m } from "framer-motion";
|
||||
import { useRouter } from "next/router";
|
||||
import { domMax, LazyMotion, m } from "framer-motion";
|
||||
import React from "react";
|
||||
|
||||
import { DayjsProvider } from "@/utils/dayjs";
|
||||
|
@ -12,7 +11,6 @@ import { MobileNavigation } from "./standard-layout/mobile-navigation";
|
|||
const StandardLayout: React.FunctionComponent<{
|
||||
children?: React.ReactNode;
|
||||
}> = ({ children, ...rest }) => {
|
||||
const router = useRouter();
|
||||
return (
|
||||
<LazyMotion features={domMax}>
|
||||
<UserProvider>
|
||||
|
@ -20,18 +18,7 @@ const StandardLayout: React.FunctionComponent<{
|
|||
<ModalProvider>
|
||||
<div className={"bg-pattern relative min-h-full"} {...rest}>
|
||||
<MobileNavigation />
|
||||
<div className="mx-auto max-w-4xl">
|
||||
<AnimatePresence initial={false} exitBeforeEnter={true}>
|
||||
<m.div
|
||||
key={router.asPath}
|
||||
initial={{ opacity: 0, y: -50 }}
|
||||
animate={{ opacity: 1, y: 0 }}
|
||||
exit={{ opacity: 0, y: -50 }}
|
||||
>
|
||||
{children}
|
||||
</m.div>
|
||||
</AnimatePresence>
|
||||
</div>
|
||||
<div className="mx-auto max-w-4xl">{children}</div>
|
||||
</div>
|
||||
</ModalProvider>
|
||||
</DayjsProvider>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue