fixes, qol and stuff

This commit is contained in:
2026-07-21 12:30:53 +01:00
parent 8acc692b08
commit 5ffebe4895
22 changed files with 611 additions and 66 deletions
+32
View File
@@ -0,0 +1,32 @@
export const prerender = true;
import { type StoreEntity } from "../+page.server.ts";
export type ProductPageData = {
product: StoreEntity;
slug: string;
url: string;
}
const Catalog: Record<string, StoreEntity> = {};
Catalog["MagicCircle"] = { images: ["MagicCircle"], name: "Magic Circle", description: "Mreowww", short: "magiccircle", category: "Amulets", gumroad: "https://doloro.gumroad.com/l/Amulet", jinxxy: "" }
export function entries() {
return Object.keys(Catalog).map((slug) => ({ slug }));
}
export async function load({ params }: { params: { slug: string } }) {
const slug = params.slug;
const product = Catalog[slug];
if (!product) {
throw new Error(`Product not found: ${slug}`);
}
return {
product,
slug,
url: `/store/${slug}`
};
}