Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
  • Loading branch information
Christoffer Engman committed Oct 7, 2023
1 parent fd1f069 commit a5ac18b
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 12 deletions.
5 changes: 3 additions & 2 deletions .babelrc
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand All @@ -22,4 +23,4 @@
"@babel/preset-react",
"@babel/preset-typescript"
]
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -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
module.exports = i18n;
5 changes: 2 additions & 3 deletions app/src/components/Receiver.tsx
Original file line number Diff line number Diff line change
@@ -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'
Expand All @@ -13,9 +14,7 @@ const Receiver = () => {
dispatch(setPressed(button.nr, event === BUTTON_DOWN ?? false))
})

return (
<></>
)
return <></>
}

export default Receiver
3 changes: 2 additions & 1 deletion app/src/index.tsx
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
// @ts-nocheck
import React, { Suspense } from 'react'
import { createRoot } from 'react-dom/client'
import i18n from 'I18n/i18n.config'
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)
Expand Down
5 changes: 3 additions & 2 deletions tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
]
}
}

0 comments on commit a5ac18b

Please sign in to comment.