Skip to content

Commit 0ee5e6c

Browse files
committed
Don't use isGitpodIo
1 parent 40d127d commit 0ee5e6c

File tree

1 file changed

+9
-6
lines changed

1 file changed

+9
-6
lines changed

components/dashboard/src/Login.tsx

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ import { UserContext } from "./user-context";
1010
import { getGitpodService } from "./service/service";
1111
import { iconForAuthProvider, openAuthorizeWindow, simplifyProviderName } from "./provider-utils";
1212
import exclamation from "./images/exclamation.svg";
13-
import { getURLHash, isGitpodIo, isTrustedUrlOrPath } from "./utils";
13+
import { getURLHash, isTrustedUrlOrPath } from "./utils";
1414
import ErrorMessage from "./components/ErrorMessage";
1515
import { Heading1, Heading2, Subheading } from "./components/typography/headings";
1616
import { SSOLoginForm } from "./login/SSOLoginForm";
@@ -45,6 +45,8 @@ export const Login: FC<LoginProps> = ({ onLoggedIn }) => {
4545
const [hostFromContext, setHostFromContext] = useState<string | undefined>();
4646
const [repoPathname, setRepoPathname] = useState<string | undefined>();
4747

48+
const enterprise = !!authProviders.data && authProviders.data.length === 0;
49+
4850
useEffect(() => {
4951
if (urlHash.length > 0) {
5052
const url = new URL(urlHash);
@@ -60,17 +62,17 @@ export const Login: FC<LoginProps> = ({ onLoggedIn }) => {
6062
<div
6163
id="login-container"
6264
className={cn("z-50 flex flex-col-reverse lg:flex-row w-full min-h-screen", {
63-
"bg-[#FDF1E7] dark:bg-[#23211e]": isGitpodIo(),
65+
"bg-[#FDF1E7] dark:bg-[#23211e]": !enterprise,
6466
})}
6567
>
66-
{isGitpodIo() ? (
67-
<PAYGLoginWrapper
68+
{enterprise ? (
69+
<EnterpriseLoginWrapper
6870
onLoggedIn={onLoggedIn}
6971
providerFromContext={providerFromContext}
7072
repoPathname={repoPathname}
7173
/>
7274
) : (
73-
<EnterpriseLoginWrapper
75+
<PAYGLoginWrapper
7476
onLoggedIn={onLoggedIn}
7577
providerFromContext={providerFromContext}
7678
repoPathname={repoPathname}
@@ -322,7 +324,8 @@ const LeftPanel = () => {
322324
},
323325
{
324326
title: "Local environments to replace Docker Desktop",
325-
description: "Built-in Linux virtualization to run Dev Container without Docker Desktop on MacOS",
327+
description:
328+
"Built-in Linux virtualization to run Dev Container without Docker Desktop on MacOS",
326329
},
327330
{
328331
title: "Automate common development workflows",

0 commit comments

Comments
 (0)