resolved typescript problems for success.tsx, useTheme.tsx and event.ts (#786)

* resolved typescript problems for success.tsx, useTheme.tsx and event.ts

* remove NextRouter inferred type

Co-authored-by: Alex Johansson <[email protected]>

* remove router query inferred type

Co-authored-by: Alex Johansson <[email protected]>

* URIcomponent change ternary

Co-authored-by: Alex Johansson <[email protected]>

* infer types for event type

* completed requested changes

* Update pages/success.tsx | change context type to proper

Co-authored-by: Alex Johansson <[email protected]>

Co-authored-by: Peer Richelsen <[email protected]>
Co-authored-by: Alex Johansson <[email protected]>
Co-authored-by: Alex van Andel <[email protected]>
Co-authored-by: Bailey Pumfleet <[email protected]>
This commit is contained in:
authored and GitHub committed 2021-10-05 23:53:24 +01:00
1 parent 95b49a5995
commit 521be467a4
3 files changed
+40 -32

No files matched your search

+2
View File
@@ -11,6 +11,8 @@ export default function useTheme(theme?: Maybe<string>) {
}
if (!theme && window.matchMedia("(prefers-color-scheme: dark)").matches) {
document.documentElement.classList.add("dark");
} else if (!theme) {
/** Uncovered case */
} else {
document.documentElement.classList.add(theme);
}