diff --git a/src/components/catalog/CatalogCard.astro b/src/components/catalog/CatalogCard.astro new file mode 100644 index 00000000..67da997a --- /dev/null +++ b/src/components/catalog/CatalogCard.astro @@ -0,0 +1,58 @@ +--- +interface Props { + page: number | string | undefined; + lang: string; +} +interface Asset { + title: string; + description: string; + author: string; + image: string; + tags: []; + version: string; + background_image: string | null; + background_video: string | null; + payload: string; + type: "theme" | "plugin-sw" | "plugin-page"; +} +const { page, lang } = Astro.props; +const getAssets = async () => { + const res = await fetch(new URL(`/api/catalog-assets?page=${page}`, Astro.url)); + const data = await res.json(); + return data.assets; +}; +const assets = await getAssets(); +--- +
Loading...
- {/snippet} - {#snippet children(suspend)} - {#await suspend(assets) then data} - {#if Object.keys(data).length > 0} -The Nebula Catalog is a place for you to find user-created themes and plugins.
-