PluginProbe
Hostinger Tools / trunk
Hostinger Tools vtrunk
3.0.78 3.0.77 3.0.76 3.0.75 3.0.74 3.0.73 3.0.72 3.0.71 3.0.70 3.0.69 3.0.68 3.0.67 3.0.66 1.8.1 1.8.2 1.8.3 1.9.1 1.9.4 1.9.5 1.9.6 1.9.7 1.9.8 1.9.9 2.0.0 2.0.1 All 109 releases
hostinger / vue-frontend / src / stores / generalStoreData.ts

generalStoreData.ts in Hostinger Tools trunk, at vue-frontend/src/stores/generalStoreData.ts

23 lines 542 B
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 import { defineStore } from "pinia";
2 import { ref } from "vue";
3
4 import { HostingerToolsData, STORE_PERSISTENT_KEYS } from "@/types";
5 import { snakeToCamelObj } from "@/utils/services";
6
7 export const useGeneralStoreData = defineStore(
8 "generalStoreData",
9 () => {
10 const toolsData = ref<HostingerToolsData>(
11 // @ts-expect-error - hostinger_tools_data is a global variable
12 snakeToCamelObj(hostinger_tools_data)
13 );
14
15 return {
16 ...toolsData.value
17 };
18 },
19 {
20 persist: { key: STORE_PERSISTENT_KEYS.TOOLS_GENERAL_DATA_STORE }
21 }
22 );
23