+
{categories.map((category, index) => (
parent_category?.handle === 'tto-categories',
);
- console.log('serviceCategories', serviceCategories);
+
return {
analyses:
category?.products?.map(
diff --git a/app/home/(user)/_lib/server/load-category.ts b/app/home/(user)/_lib/server/load-category.ts
new file mode 100644
index 0000000..2c0479c
--- /dev/null
+++ b/app/home/(user)/_lib/server/load-category.ts
@@ -0,0 +1,31 @@
+import { cache } from 'react';
+
+import { getProductCategories } from '@lib/data';
+
+import { ServiceCategory } from '../../_components/service-categories';
+
+async function categoryLoader({
+ handle,
+}: {
+ handle: string;
+}): Promise<{ category: ServiceCategory | null }> {
+ const response = await getProductCategories({
+ handle,
+ fields: '*products, is_active, metadata',
+ });
+
+ const category = response.product_categories[0];
+
+ return {
+ category: {
+ color:
+ typeof category?.metadata?.color === 'string'
+ ? category?.metadata?.color
+ : 'primary',
+ description: category?.description || '',
+ handle: category?.handle || '',
+ name: category?.name || '',
+ },
+ };
+}
+export const loadCategory = cache(categoryLoader);
diff --git a/app/home/(user)/_lib/server/load-tto-services.ts b/app/home/(user)/_lib/server/load-tto-services.ts
index a8b4e1b..3bbc4e5 100644
--- a/app/home/(user)/_lib/server/load-tto-services.ts
+++ b/app/home/(user)/_lib/server/load-tto-services.ts
@@ -8,7 +8,7 @@ async function ttoServicesLoader() {
const response = await getProductCategories({
fields: '*products, is_active, metadata',
});
- console.log('response.product_categories', response.product_categories);
+
const heroCategories = response.product_categories?.filter(
({ parent_category, is_active, metadata }) =>
parent_category?.handle === 'tto-categories' &&
diff --git a/public/locales/et/booking.json b/public/locales/et/booking.json
index 17554de..3410d59 100644
--- a/public/locales/et/booking.json
+++ b/public/locales/et/booking.json
@@ -1,8 +1,9 @@
{
- "title": "Vali teenus",
- "description": "Vali sobiv teenus või pakett vastavalt oma tervisemurele või -eesmärgile.",
- "analysisPackages": {
- "title": "Analüüside paketid",
- "description": "Tutvu personaalsete analüüsi pakettidega ja telli"
- }
-}
\ No newline at end of file
+ "title": "Vali teenus",
+ "description": "Vali sobiv teenus või pakett vastavalt oma tervisemurele või -eesmärgile.",
+ "analysisPackages": {
+ "title": "Analüüside paketid",
+ "description": "Tutvu personaalsete analüüsi pakettidega ja telli"
+ },
+ "noCategories": "Teenuste loetelu ei leitud, proovi hiljem uuesti"
+}
diff --git a/public/locales/et/common.json b/public/locales/et/common.json
index 8239aaf..70e6ec6 100644
--- a/public/locales/et/common.json
+++ b/public/locales/et/common.json
@@ -80,7 +80,8 @@
"dashboard": "Ülevaade",
"settings": "Settings",
"profile": "Profile",
- "application": "Application"
+ "application": "Application",
+ "pickTime": "Vali aeg"
},
"roles": {
"owner": {