+
+
+ ID ORDINE:
+ {order.id}
+
+
+ EFFETTUATO IL:
+ {new Date(order.date_created).toLocaleDateString()}
+
+
+ TOTALE:
+ {order.total} {order.currency}
+
{order.line_items.map((item, i) => (
-
+
-
@@ -56,25 +55,13 @@ export default async function OrdersPage() {
currencyCode={order.currency}
/>
-
+
))}
-
-
-
+
+ Vedi dettagli
-
+
))}
);
diff --git a/components/layout/footer.tsx b/components/layout/footer.tsx
index 4de321827..d4090fed0 100644
--- a/components/layout/footer.tsx
+++ b/components/layout/footer.tsx
@@ -26,7 +26,7 @@ export default async function Footer() {
},
...categories.map((category) => ({
title: category.name,
- path: path.join('/collection', category.id.toString())
+ path: path.join('/collection', category.slug.toString())
}))
] as Menu[];
const currentYear = new Date().getFullYear();
diff --git a/components/layout/navbar/index.tsx b/components/layout/navbar/index.tsx
index 92e187697..2243a6a36 100644
--- a/components/layout/navbar/index.tsx
+++ b/components/layout/navbar/index.tsx
@@ -25,7 +25,7 @@ export async function Navbar() {
},
...categories.map((category) => ({
title: category.name,
- path: path.join('/collection', category.id.toString())
+ path: path.join('/collection', category.slug)
}))
] as Menu[];
diff --git a/lib/utils.ts b/lib/utils.ts
index 33b7cc8f6..35a6d4b63 100644
--- a/lib/utils.ts
+++ b/lib/utils.ts
@@ -16,3 +16,9 @@ export const getCountries = (): { name: string; icon: string }[] =>
name: country,
icon: flag_base64
}));
+
+export const isStrinInteger = (value: string) => {
+ const parsed = parseInt(value, 10);
+
+ return !isNaN(parsed) && parsed.toString() === value.trim();
+}