commerce/app/[page]/layout.tsx
Chloe a1d65a54c1
feat: implement text/image-with-text/icon-with-text content block
Signed-off-by: Chloe <pinkcloudvnn@gmail.com>
2024-05-23 14:17:55 +07:00

27 lines
670 B
TypeScript

import Footer from 'components/layout/footer';
import { Suspense } from 'react';
const Placeholder = () => {
return (
<div className="mx-auto mb-2 w-full max-w-7xl animate-pulse py-6">
<div className="h-10 w-1/2 rounded bg-gray-200" />
<div className="mt-6 h-96 w-full rounded bg-gray-200" />
</div>
);
};
export default function Layout({ children }: { children: React.ReactNode }) {
return (
<>
<div className="min-h-[600px] w-full">
<Suspense fallback={<Placeholder />}>
<div className="py-6">{children}</div>
</Suspense>
</div>
<Suspense>
<Footer />
</Suspense>
</>
);
}