diff --git a/.babelrc b/.babelrc index 0130db2..6c51474 100644 --- a/.babelrc +++ b/.babelrc @@ -11,7 +11,8 @@ "Pages": "./app/src/pages", "Redux": "./app/src/redux", "I18n": "./app/localization", - "Images": "./resources/images" + "Images": "./resources/images", + "Utils": "./app/src/utils" } }, "@babel/plugin-syntax-dynamic-import" @@ -22,4 +23,4 @@ "@babel/preset-react", "@babel/preset-typescript" ] -} \ No newline at end of file +} diff --git a/app/localization/i18n.config.ts b/app/localization/i18n.config.js similarity index 88% rename from app/localization/i18n.config.ts rename to app/localization/i18n.config.js index 15a07b5..2e10387 100644 --- a/app/localization/i18n.config.ts +++ b/app/localization/i18n.config.js @@ -28,13 +28,12 @@ i18n supportedLngs: whitelist.langs }); -window.api.i18nextElectronBackend.onLanguageChange((args: any) => { - i18n.changeLanguage(args.lng, (error: any, _t: any) => { +window.api.i18nextElectronBackend.onLanguageChange((args) => { + i18n.changeLanguage(args.lng, (error, _t) => { if (error) { console.error(error); } }); }); -// module.exports = i18n; -export default i18n \ No newline at end of file +module.exports = i18n; \ No newline at end of file diff --git a/app/src/components/Receiver.tsx b/app/src/components/Receiver.tsx index 89280ac..33d0686 100644 --- a/app/src/components/Receiver.tsx +++ b/app/src/components/Receiver.tsx @@ -1,4 +1,5 @@ import { BUTTON_DOWN } from 'Constants/events' +import { CHANNELS } from 'Constants/ipc' import { setPressed } from 'Redux/components/pad/padActions' import React, { useEffect } from 'react' import { useDispatch } from 'react-redux' @@ -13,9 +14,7 @@ const Receiver = () => { dispatch(setPressed(button.nr, event === BUTTON_DOWN ?? false)) }) - return ( - <> - ) + return <> } export default Receiver diff --git a/app/src/index.tsx b/app/src/index.tsx index b69f96e..e2d6ae0 100644 --- a/app/src/index.tsx +++ b/app/src/index.tsx @@ -1,3 +1,4 @@ +// @ts-nocheck import React, { Suspense } from 'react' import { createRoot } from 'react-dom/client' import i18n from 'I18n/i18n.config' @@ -5,7 +6,7 @@ import { I18nextProvider } from 'react-i18next' import Root from 'Core/root' import { store, history } from 'Redux/store/store' import 'bulma/css/bulma.css' -import Receiver from 'Components/Receiver' +import Receiver from './components/Receiver' const container = document.getElementById('target') const root = createRoot(container) diff --git a/tsconfig.json b/tsconfig.json index 5263747..28152ca 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -30,10 +30,11 @@ "Components/*": ["./app/src/components/*"], "Constants/*": ["./app/src/constants/*"], "Pages/*": ["./app/src/pages/*"], - "Utils/*": ["./app/src/utils/*"] + "Utils/*": ["./app/src/utils/*"], + "Images/*": ["./resources/images/*"] } }, "include": [ "app/src" ] -} \ No newline at end of file +}