PluginProbe ʕ •ᴥ•ʔ
Hostinger Reach – AI-Powered Email Marketing for WordPress / 1.7.1
Hostinger Reach – AI-Powered Email Marketing for WordPress v1.7.1
1.7.2 1.7.1 1.7.0 1.6.0 1.5.9 1.5.8 1.5.7 1.5.6 1.5.5 1.5.4 1.5.3 1.5.2 1.5.1 1.5.0 1.4.12 1.4.11 1.4.10 1.4.9 1.4.8 1.4.7 trunk 1.0.1 1.0.10 1.0.11 1.0.12 1.0.13 1.0.14 1.0.2 1.0.3 1.0.4 1.0.5 1.0.6 1.0.7 1.0.8 1.0.9 1.1.0 1.1.1 1.2.0 1.2.1 1.2.2 1.2.3 1.2.4 1.3.0 1.3.1 1.3.2 1.3.3 1.3.4 1.3.5 1.3.6 1.3.7 1.3.8 1.3.9 1.4.0 1.4.2 1.4.3 1.4.4 1.4.5 1.4.6
hostinger-reach / frontend / vue / composables / useHostingData.ts
hostinger-reach / frontend / vue / composables Last commit date
index.ts 1 year ago useAmplitudeEvent.ts 3 months ago useHostingData.ts 3 months ago useModal.ts 1 year ago useOverviewData.ts 9 months ago useReachUrls.ts 1 month ago useScrollLock.ts 11 months ago useServerPagination.ts 10 months ago useToast.ts 1 year ago
useHostingData.ts
38 lines
1 import { ref } from 'vue';
2
3 import { hostingRepo } from '@/data/repositories/hostingRepo';
4 import type { DomainDetails } from '@/types/models/hostingDataModels';
5 import { translate } from '@/utils/translate';
6
7 export const useHostingData = () => {
8 const isLoading = ref(false);
9 const error = ref<string | null>(null);
10 const domainDetails = ref<DomainDetails | null>(null);
11
12 const loadDomainDetails = async () => {
13 isLoading.value = true;
14 error.value = null;
15
16 const [data, err] = await hostingRepo.getDomainDetails();
17
18 isLoading.value = false;
19
20 if (err) {
21 error.value = err.message || translate('hostinger_reach_error_message');
22
23 return;
24 }
25
26 if (data) {
27 domainDetails.value = data;
28 }
29 };
30
31 return {
32 isLoading,
33 error,
34 domainDetails,
35 loadDomainDetails
36 };
37 };
38