@crm-market/template-shared 1.0.6 → 1.0.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { computed } from 'vue';
|
|
2
|
-
import { useState
|
|
2
|
+
import { useState } from '#imports';
|
|
3
3
|
import { getApiBaseUrl } from '../utils/api';
|
|
4
4
|
import { useSiteConfig } from './useSiteConfig';
|
|
5
5
|
|
|
@@ -21,7 +21,6 @@ export const useCategories = () => {
|
|
|
21
21
|
const loading = useState<boolean>('categories-loading', () => false);
|
|
22
22
|
const error = useState<string | null>('categories-error', () => null);
|
|
23
23
|
|
|
24
|
-
const config = useRuntimeConfig();
|
|
25
24
|
const { publicApiToken } = useSiteConfig();
|
|
26
25
|
|
|
27
26
|
// Fetch all categories
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { ref } from 'vue';
|
|
2
|
-
import { useRuntimeConfig } from '#imports';
|
|
3
2
|
import { useCart } from './useCart';
|
|
4
3
|
import { useSiteConfig } from './useSiteConfig';
|
|
5
4
|
|
|
@@ -33,7 +32,6 @@ const error = ref<string | null>(null);
|
|
|
33
32
|
const orderId = ref<string | null>(null);
|
|
34
33
|
|
|
35
34
|
export const useCheckout = () => {
|
|
36
|
-
const config = useRuntimeConfig();
|
|
37
35
|
const { cart, clearCart } = useCart();
|
|
38
36
|
const { organizationId } = useSiteConfig();
|
|
39
37
|
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { ref, computed } from 'vue';
|
|
2
|
-
import { useRuntimeConfig } from '#imports';
|
|
3
2
|
import { getApiBaseUrl } from '../utils/api';
|
|
4
3
|
import { useSiteConfig } from './useSiteConfig';
|
|
5
4
|
|
|
@@ -33,7 +32,6 @@ const error = ref<string | null>(null);
|
|
|
33
32
|
const currentProduct = ref<Product | null>(null);
|
|
34
33
|
|
|
35
34
|
export const useProducts = () => {
|
|
36
|
-
const config = useRuntimeConfig();
|
|
37
35
|
const { publicApiToken } = useSiteConfig();
|
|
38
36
|
|
|
39
37
|
// Fetch all products with optional filters
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { computed } from 'vue';
|
|
2
|
-
import { useState,
|
|
2
|
+
import { useState, useRequestHeaders } from '#imports';
|
|
3
3
|
import { getApiBaseUrl } from '../utils/api';
|
|
4
4
|
|
|
5
5
|
interface ColorScheme {
|
|
@@ -61,8 +61,6 @@ export const useSiteConfig = () => {
|
|
|
61
61
|
const loading = useState<boolean>('site-config-loading', () => false);
|
|
62
62
|
const error = useState<string | null>('site-config-error', () => null);
|
|
63
63
|
|
|
64
|
-
const config = useRuntimeConfig();
|
|
65
|
-
|
|
66
64
|
// Отримати subdomain з host — працює і на SSR, і на клієнті
|
|
67
65
|
const getSubdomain = () => {
|
|
68
66
|
let hostname = '';
|
package/package.json
CHANGED
package/utils/image.ts
CHANGED