Nicer item page

Add markdown support to item description
Cart now gets loaded in the background, poorly implemented I presume
This commit is contained in:
Michał Gdula 2024-05-08 17:53:21 +01:00
parent a704082779
commit a1dfcd3c35
14 changed files with 365 additions and 140 deletions

View file

@ -1,48 +1,59 @@
import type { Item } from "./types";
import { Labels } from "./types";
import { type Item, Labels } from "./types";
const TestData: Item[] = [
{
uuid: "soap",
name: "Bar of Soap",
price: 69.99,
description: `
Example
`,
labels: [Labels.vegan, Labels.spicy],
description: "Example",
},
{
uuid: "sock",
name: "Sock",
price: 21,
description: `
Example
`,
labels: [Labels.vegan, Labels.fish, Labels.nut, Labels.spicy],
description: "Example",
},
{
uuid: "brick",
name: "Brick",
price: 0,
description: `
Example
`,
labels: [Labels.spicy],
description: "Example",
},
{
uuid: "toast",
name: "Toast",
price: 4382749832743,
description: `
Example
`,
labels: [Labels.gluten],
description: "Example",
},
{
uuid: "water",
name: "water",
price: 1,
description: `
Example
`,
labels: [Labels.fish],
description: "Example",
},
{
uuid: "mouldy_bread",
name: "half eaten mouldy bread",
price: -99,
description: `
Example
`,
labels: [Labels.nut],
description: "Example",
},
{
uuid: "gwagwa",
@ -55,17 +66,27 @@ const TestData: Item[] = [
uuid: "hogmelon",
name: "Hogermellon",
price: 1111,
labels: [Labels.fish],
images: ["/item_images/wathog.jpg"],
description: "Example",
description: `
This is a sample description. Gay Balls.
Contains the following:
- hog
- melon
`,
labels: [Labels.nut, Labels.gluten, Labels.spicy, Labels.fish],
images: ["/item_images/wathog.jpg","/item_images/sonichog.jpg"],
},
{
uuid: "bluhog",
name: "Blue HOGGGGG",
price: 0,
description: `
This is a sample description.
Gay Balls
`,
labels: [Labels.nut, Labels.gluten, Labels.spicy],
images: ["/item_images/sonichog.jpg"],
description: "Example",
},
];