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:
1 parent
bb1da8150f
commit
f709972f86
4 files changed
+8
-10
No files matched your search
@@ -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 {
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user