refactor(ui): cleanup UI client instance getter
[e-mobility-charging-stations-simulator.git] / ui / web / src / composables / Utils.ts
index 467760535c6f5ec88cc1c58949a5c267743806f7..8db8851ad646819e43a6fa4dbb53bf245d06badd 100644 (file)
@@ -1,3 +1,5 @@
+import { UIClient } from './UIClient'
+
 export const convertToBoolean = (value: unknown): boolean => {
   let result = false
   if (value != null) {
@@ -53,3 +55,7 @@ export const getLocalStorage = (): Storage => {
 export const randomUUID = (): `${string}-${string}-${string}-${string}-${string}` => {
   return crypto.randomUUID()
 }
+
+export const useUIClient = (): UIClient => {
+  return UIClient.getInstance()
+}