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:
3 files changed
+40
-32
No files matched your search
@@ -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);
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user