mirror of
https://github.com/vercel/commerce.git
synced 2025-07-23 04:36:49 +00:00
feat: implement text/image-with-text/icon-with-text content block
Signed-off-by: Chloe <pinkcloudvnn@gmail.com>
This commit is contained in:
@@ -1,15 +1,26 @@
|
||||
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 (
|
||||
<Suspense>
|
||||
<div className="w-full">
|
||||
<div className="mx-8 max-w-2xl py-20 sm:mx-auto">
|
||||
<Suspense>{children}</Suspense>
|
||||
</div>
|
||||
<>
|
||||
<div className="min-h-[600px] w-full">
|
||||
<Suspense fallback={<Placeholder />}>
|
||||
<div className="py-6">{children}</div>
|
||||
</Suspense>
|
||||
</div>
|
||||
<Footer />
|
||||
</Suspense>
|
||||
<Suspense>
|
||||
<Footer />
|
||||
</Suspense>
|
||||
</>
|
||||
);
|
||||
}
|
||||
|
Reference in New Issue
Block a user