diff --git a/src/pages/store/[...page].astro b/src/pages/store/[...page].astro deleted file mode 100644 index 2aac337..0000000 --- a/src/pages/store/[...page].astro +++ /dev/null @@ -1,79 +0,0 @@ ---- -import BaseLayout from "../../layouts/BaseLayout.astro"; -import HorizontalShopItem from "../../components/HorizontalShopItem.astro"; -import { getCollection } from "astro:content"; - -export async function getStaticPaths({ paginate }) { - const items = await getCollection("store"); - items.sort((a, b) => b.data.updatedDate.valueOf() - a.data.updatedDate.valueOf()); - return paginate(items, { pageSize: 10 }); -} -const { page } = Astro.props; ---- - - - - { - page.data.map((item) => ( - <> - - - > - )) - } - - - - { - page.url.prev ? ( - - {" "} - - - {" "} - Previous page - - ) : ( - - ) - } - { - page.url.next ? ( - - Next page{" "} - - {" "} - - - - ) : ( - - ) - } - - diff --git a/src/pages/store/[slug].astro b/src/pages/store/[slug].astro deleted file mode 100644 index 6e672f0..0000000 --- a/src/pages/store/[slug].astro +++ /dev/null @@ -1,37 +0,0 @@ ---- -import { CollectionEntry, getCollection } from "astro:content"; -import { StoreSchema } from "../../content/config"; -import StoreItemLayout from "../../layouts/StoreItemLayout.astro"; - -export async function getStaticPaths() { - const itemEntries = await getCollection("store"); - return itemEntries.map((entry) => ({ - params: { slug: entry.slug }, - props: { entry }, - })); -} - -interface Props { - entry: CollectionEntry<"store">; -} - -const { entry } = Astro.props; -const item: StoreSchema = entry.data; -const { Content } = await entry.render(); ---- - - - -