diff --git a/components/ui/Alert.tsx b/components/ui/Alert.tsx
index 08deee22..2b12f128 100644
--- a/components/ui/Alert.tsx
+++ b/components/ui/Alert.tsx
@@ -32,7 +32,7 @@ export function Alert(props: AlertProps) {
)}
-
+
{props.title}
{props.message}
diff --git a/lib/core/browser/browser.utils.ts b/lib/core/browser/browser.utils.ts
index 828c6ca1..aa913530 100644
--- a/lib/core/browser/browser.utils.ts
+++ b/lib/core/browser/browser.utils.ts
@@ -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
=> {
- if (!isBrowser()) {
+ if (!process.browser) {
return {};
}
return {
diff --git a/lib/core/browser/useDarkMode.tsx b/lib/core/browser/useDarkMode.tsx
index 35a7bad4..b0ccbb22 100644
--- a/lib/core/browser/useDarkMode.tsx
+++ b/lib/core/browser/useDarkMode.tsx
@@ -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;
}
diff --git a/pages/event-types/index.tsx b/pages/event-types/index.tsx
index b6d0b214..2ac93379 100644
--- a/pages/event-types/index.tsx
+++ b/pages/event-types/index.tsx
@@ -113,8 +113,8 @@ const EventTypesPage = (props: PageProps) => {
)}
- {typeof window !== "undefined" && profile?.slug && (
-
+ {profile?.slug && (
+
{`cal.com/${profile.slug}`}
)}
@@ -293,15 +293,15 @@ const EventTypesPage = (props: PageProps) => {
)
}>
- {props.user.plan === "FREE" && !props.canAddEvents && typeof window !== "undefined" && (
+ {props.user.plan === "FREE" && !props.canAddEvents && (
You need to upgrade your plan to have more than one active event type.>}
message={
<>
To upgrade go to{" "}
-
- {process.env.UPGRADE_URL || "https://cal.com/upgrade"}
+
+ {"https://cal.com/upgrade"}
>
}