Skip to content

Commit 779e989

Browse files
committed
add toys category.
1 parent 9a6ed3f commit 779e989

File tree

4 files changed

+28
-1
lines changed

4 files changed

+28
-1
lines changed
82.8 KB
Loading

src/data/products.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ import { ready_to_cook } from './products/ready_to_cook';
66
import { home_essentials } from './products/home_essentials';
77
import { electronics } from './products/electronics';
88
import { telecommunications } from './products/telecommunications';
9+
import { toys } from './products/toys';
910
import { misc } from './products/misc';
1011

1112
// Combine all products from different categories into one array
@@ -18,6 +19,7 @@ export const products = [
1819
...home_essentials,
1920
...electronics,
2021
...telecommunications,
22+
...toys,
2123
...misc
2224
].map((item, index) => {
2325
return {

src/data/products/toys.ts

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
const toDate = (d: string) => new Date(d);
2+
3+
interface Product {
4+
title: string;
5+
s_desc: string;
6+
img: string;
7+
stock: boolean;
8+
featured?: boolean;
9+
uom?: string;
10+
quantity?: number;
11+
price?: number;
12+
sale?: number;
13+
added: Date;
14+
cat: string;
15+
}
16+
17+
export const toys: Product[] = [
18+
{
19+
title: 'Labubu Toys 🧸🌈',
20+
s_desc: "Adorable, collectible, and full of charm, our Labubu Toys are here in a variety of fun colors!",
21+
img: 'toys/labubu_toy.jpg',
22+
stock: true,
23+
featured: true,
24+
added: toDate("2025-07-04T11:27:47")
25+
}
26+
].map((item) => ({ ...item, cat: 'Toys' }));

src/sections/Home.svelte

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,6 @@
5656
alt="Shopping basket full of groceries"
5757
loading="eager"
5858
draggable="false"
59-
style="fill: #333"
6059
/>
6160
</div>
6261
</div>

0 commit comments

Comments
 (0)