feat: Update ThemesMarketplace to use lazy loading for images
This commit is contained in:
@@ -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>
|
||||||
|
|||||||
Reference in New Issue
Block a user