@@ -124,8 +136,14 @@ onMounted(async () => {
+
+
+
+
+
diff --git a/src/services/axiosSetup.ts b/src/services/axiosSetup.ts
index f3beb50..1b440fd 100644
--- a/src/services/axiosSetup.ts
+++ b/src/services/axiosSetup.ts
@@ -4,8 +4,8 @@ import { useRouter } from 'vue-router';
// Создаем экземпляр axios
const api = axios.create({
- baseURL: 'https://luminic.space/api/',
- // baseURL: 'http://localhost:8082/api',
+ // baseURL: 'https://luminic.space/api/',
+ baseURL: 'http://localhost:8082/api',
});
// Устанавливаем токен из localStorage при каждом запуске
diff --git a/src/utils/EventBus.ts b/src/utils/EventBus.ts
new file mode 100644
index 0000000..b7c5c16
--- /dev/null
+++ b/src/utils/EventBus.ts
@@ -0,0 +1,21 @@
+import { EventEmitter } from 'events';
+
+interface Events {
+ 'transaction-created': { id: number; data: string }; // Типизация событий
+}
+
+class TypedEventBus extends EventEmitter {
+ emit(event: K, payload: Events[K]): boolean {
+ return super.emit(event, payload);
+ }
+
+ on(event: K, listener: (payload: Events[K]) => void): this {
+ return super.on(event, listener);
+ }
+
+ off(event: K, listener: (payload: Events[K]) => void): this {
+ return super.off(event, listener);
+ }
+}
+
+export const EventBus = new TypedEventBus();