ui bug: alert looking funky (#766)

* tweak alert text to be growing
* fix alert looking funky
* get rid of `typeof window` dirt
This commit is contained in:
Alex Johansson authored and GitHub committed 2021-09-24 06:52:00 -06:00
1 parent bb1da8150f
commit f709972f86
4 files changed
+8 -10

No files matched your search

+1 -3
View File
@@ -1,5 +1,3 @@
export const isBrowser = () => typeof window !== "undefined";
type BrowserInfo = {
url: string;
path: string;
@@ -9,7 +7,7 @@ type BrowserInfo = {
};
export const getBrowserInfo = (): Partial<BrowserInfo> => {
if (!isBrowser()) {
if (!process.browser) {
return {};
}
return {
+1 -1
View File
@@ -12,7 +12,7 @@ interface UseDarkModeOutput {
function useDarkMode(defaultValue?: boolean): UseDarkModeOutput {
const getPrefersScheme = (): boolean => {
// Prevents SSR issues
if (typeof window !== "undefined") {
if (process.browser) {
return window.matchMedia(COLOR_SCHEME_QUERY).matches;
}