Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 15 additions & 1 deletion src/components/AppLayout.jsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import React from 'react'
import { useLocation } from 'react-router-dom'
import { Navbar } from './Navbar'
import Footer from './Footer'
import { motion } from 'framer-motion'
Expand All @@ -13,6 +14,8 @@ const Background = () => (
)

export default function AppLayout({ children, showBackground = true }) {
const { pathname } = useLocation()

return (
<motion.div
className="theme-app min-h-screen flex flex-col relative overflow-x-hidden"
Expand All @@ -29,7 +32,18 @@ export default function AppLayout({ children, showBackground = true }) {

<Breadcrumbs />

<div className="flex-1">{children}</div>
<motion.div
key={pathname}
className="flex-1 flex flex-col"
initial={{ opacity: 0, y: 12, scale: 0.992 }}
animate={{ opacity: 1, y: 0, scale: 1 }}
transition={{
duration: 0.6,
ease: [0.21, 1, 0.36, 1],
}}
>
{children}
</motion.div>

<Footer />
<ScrollToTopButton />
Expand Down
Loading
Loading