Skip to content

Commit

Permalink
馃敟 Remove page animations
Browse files Browse the repository at this point in the history
  • Loading branch information
lukevella committed Mar 6, 2023
1 parent 6636101 commit ecd63ae
Showing 1 changed file with 2 additions and 15 deletions.
17 changes: 2 additions & 15 deletions apps/web/src/components/layouts/standard-layout.tsx
Original file line number Diff line number Diff line change
@@ -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";
Expand All @@ -12,26 +11,14 @@ import { MobileNavigation } from "./standard-layout/mobile-navigation";
const StandardLayout: React.FunctionComponent<{
children?: React.ReactNode;
}> = ({ children, ...rest }) => {
const router = useRouter();
return (
<LazyMotion features={domMax}>
<UserProvider>
<DayjsProvider>
<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>
Expand Down

0 comments on commit ecd63ae

Please sign in to comment.