diff --git a/apps/pwa/src/utils/x_state.tsx b/apps/pwa/src/utils/x_state.tsx index e4012850..cebd2627 100644 --- a/apps/pwa/src/utils/x_state.tsx +++ b/apps/pwa/src/utils/x_state.tsx @@ -1,4 +1,4 @@ -import { useState, useEffect, ComponentType } from 'react'; +import { useState, useEffect } from 'react'; import Eventin from 'eventin'; enum EventType { @@ -51,25 +51,6 @@ class XState { return state; } - - withState< - PropName extends string, - Props extends { [key in PropName]: State }, - >(propName: PropName, Component: ComponentType) { - const self = this; - return function ComponentWithXState(props: Omit) { - const state = self.useState(); - return ( - // @ts-expect-error - - ); - }; - } } export default XState; diff --git a/package-lock.json b/package-lock.json index 7a6c0899..800a4b6e 100644 --- a/package-lock.json +++ b/package-lock.json @@ -96,7 +96,7 @@ "eslint-plugin-jsx-a11y": "^6.7.1", "eslint-plugin-react": "^7.32.2", "eslint-plugin-react-hooks": "^4.6.0", - "eventin": "^1.2.0", + "eventin": "^2.0.1", "file-saver": "^2.0.5", "fork-ts-checker-webpack-plugin": "^8.0.0", "html-webpack-plugin": "^5.5.1", @@ -9557,9 +9557,10 @@ "license": "MIT" }, "node_modules/eventin": { - "version": "1.2.0", - "dev": true, - "license": "MIT" + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/eventin/-/eventin-2.0.1.tgz", + "integrity": "sha512-+/PXHn1eSm7yK5pSnY8InKqDOWMDPvX3JvB+1iWpkW8o7Tu3u9Xb/xkL1feSV9E2kbwB9+n+5SRk6MJ9TErBJQ==", + "dev": true }, "node_modules/events": { "version": "3.3.0", diff --git a/package.json b/package.json index f86f1a1a..d6f2aa84 100644 --- a/package.json +++ b/package.json @@ -122,7 +122,7 @@ "eslint-plugin-jsx-a11y": "^6.7.1", "eslint-plugin-react": "^7.32.2", "eslint-plugin-react-hooks": "^4.6.0", - "eventin": "^1.2.0", + "eventin": "^2.0.1", "file-saver": "^2.0.5", "fork-ts-checker-webpack-plugin": "^8.0.0", "html-webpack-plugin": "^5.5.1",