diff --git a/package.json b/package.json index 24813a3..884f35b 100644 --- a/package.json +++ b/package.json @@ -32,6 +32,7 @@ "dompurify": "^3.0.9", "graphql": "^16.8.1", "graphql-tag": "^2.12.6", + "mitt": "^3.0.1", "vite-plugin-node-polyfills": "^0.21.0", "vue": "^3.4.15", "vue-i18n": "9", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index a88b153..db765ae 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -50,6 +50,9 @@ dependencies: graphql-tag: specifier: ^2.12.6 version: 2.12.6(graphql@16.8.1) + mitt: + specifier: ^3.0.1 + version: 3.0.1 vite-plugin-node-polyfills: specifier: ^0.21.0 version: 0.21.0(vite@5.0.12) @@ -5561,6 +5564,10 @@ packages: engines: {node: '>=16 || 14 >=14.17'} dev: true + /mitt@3.0.1: + resolution: {integrity: sha512-vKivATfr97l2/QBCYAkXYDbrIWPM2IIKEl7YPhjCvKlG3kE2gm+uBo6nEXK3M5/Ffh/FLpKExzOQ3JJoJGFKBw==} + dev: false + /mlly@1.5.0: resolution: {integrity: sha512-NPVQvAY1xr1QoVeG0cy8yUYC7FQcOx6evl/RjT1wL5FvzPnzOysoqB/jmx/DhssT2dYa8nxECLAaFI/+gVLhDQ==} dependencies: @@ -6315,7 +6322,6 @@ packages: react: 16.14.0 scheduler: 0.19.1 dev: false - bundledDependencies: false /react-is@16.13.1: resolution: {integrity: sha512-24e6ynE2H+OKt4kqsOvNd8kBpV65zoxbA4BVsEOB3ARVWQki/DHzaUoC5KuON/BiccDaCCTZBuOcfZs70kR8bQ==} @@ -6332,7 +6338,6 @@ packages: object-assign: 4.1.1 prop-types: 15.8.1 dev: false - bundledDependencies: false /read-cache@1.0.0: resolution: {integrity: sha512-Owdv/Ft7IjOgm/i0xvNDZ1LrRANRfew4b2prF3OWMQLxLfu3bS8FVhCsrSCMK4lR56Y9ya+AThoTpDCTxCmpRA==} diff --git a/src/App.vue b/src/App.vue index 18fcecb..8f9aaa0 100644 --- a/src/App.vue +++ b/src/App.vue @@ -1,10 +1,10 @@ diff --git a/src/bus/index.ts b/src/bus/index.ts new file mode 100644 index 0000000..8f33b8d --- /dev/null +++ b/src/bus/index.ts @@ -0,0 +1,5 @@ +import mitt from "mitt"; + +const bus = mitt(); + +export { bus }; diff --git a/src/components/AddressBalance.vue b/src/components/AddressBalance.vue index 5fe850d..7278332 100644 --- a/src/components/AddressBalance.vue +++ b/src/components/AddressBalance.vue @@ -1,5 +1,5 @@