feat: Update ThemesMarketplace to use lazy loading for images

This commit is contained in:
mauro-balades
2024-09-01 11:12:35 +02:00
parent 7575e7b22a
commit 26384860f8

View File

@@ -5,21 +5,10 @@ import { Navigation } from "@/components/navigation";
import { getAllThemes, ZenTheme } from "@/lib/themes";
import { GetStaticProps } from "next";
export const getStaticProps = (async (context) => {
const themes = await getAllThemes();
return {
props: {
themes,
},
};
}) satisfies GetStaticProps<{
themes: ZenTheme[];
}>
export default function ThemesMarketplace({ themes }: {themes:ZenTheme[]}) {
export default async function ThemesMarketplace() {
return (
<main className="flex min-h-screen flex-col items-center justify-start">
<MarketplacePage themes={themes} />
<MarketplacePage themes={await getAllThemes()} />
<Footer />
<Navigation /> {/* At the bottom of the page */}
</main>