ci: added commit lint, build check, test and release (#31)

* ci: added commit lint, build check, test and release

* refactor: fix compilation errors

* ci: add checkout to the tests

* test: resolved issues with running tests

* chore: addressed PR comments

* chore: renamed package-name in release-please
This commit is contained in:
Vojtech Simetka
2021-03-31 15:33:09 +02:00
committed by GitHub
parent 325a59098e
commit 7fc1356212
15 changed files with 23036 additions and 166 deletions
+5 -5
View File
@@ -50,16 +50,16 @@ const Dashboard = (props: any) => {
if (theme) {
toggleThemeMode(String(localStorage.getItem('theme')))
} else if (window.matchMedia && window.matchMedia('(prefers-color-scheme: dark)').matches) {
} else if (window?.matchMedia('(prefers-color-scheme: dark)')?.matches) {
toggleThemeMode('dark')
}
window.matchMedia('(prefers-color-scheme: dark)').addEventListener('change', e => {
toggleThemeMode(e.matches ? "dark" : "light")
window?.matchMedia('(prefers-color-scheme: dark)')?.addEventListener('change', e => {
toggleThemeMode(e?.matches ? "dark" : "light")
});
return () => window.matchMedia('(prefers-color-scheme: dark)').removeEventListener('change', e => {
toggleThemeMode(e.matches ? "dark" : "light")
return () => window?.matchMedia('(prefers-color-scheme: dark)')?.removeEventListener('change', e => {
toggleThemeMode(e?.matches ? "dark" : "light")
})
}, [])