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