Skip to content

Commit d709544

Browse files
Merge pull request #2 from code-kern-ai/rename-var
Renaming variable isFreeTrial
2 parents ce43c58 + 3df4e19 commit d709544

File tree

5 files changed

+9
-9
lines changed

5 files changed

+9
-9
lines changed

package-lock.json

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pages/login.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ import { KernLogo } from "@/pkg/ui/Icons"
1212
import { DemoFlow } from "@/pkg/ui/DemoFlow"
1313
import { getValueIdentifier, getValuePassword } from "@/util/helper-functions"
1414
import ory from "@/pkg/sdk"
15-
import { isDemoUser, isFreeTrial } from "@/util/constants"
15+
import { isDemoUser, isManagedApp } from "@/util/constants"
1616

1717
const Login: NextPage = () => {
1818
const [initialFlow, setInitialFlow] = useState<LoginFlow>()
@@ -116,7 +116,7 @@ const Login: NextPage = () => {
116116
<div id="login">
117117
<h2 className="title">{isDemoUser ? 'Proceed with your selected role' : 'Sign in to your account'}</h2>
118118
{!isDemoUser ? (
119-
<>{isFreeTrial ? (
119+
<>{isManagedApp ? (
120120
<p className="text-paragraph">Or
121121
<a className="link" data-testid="cta-link" href="/auth/registration"> start your 14-day free trial</a>
122122
- no credit card required!

pages/registration.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import Head from "next/head"
55
import { useRouter } from "next/router"
66
import { useEffect, useState } from "react"
77
import { KernLogo } from "@/pkg/ui/Icons"
8-
import { isFreeTrial } from "@/util/constants"
8+
import { isManagedApp } from "@/util/constants"
99
import ory from "@/pkg/sdk"
1010
import { handleFlowError } from "@/pkg/errors"
1111
import { Flow } from "@/pkg"
@@ -102,7 +102,7 @@ const Registration: NextPage = () => {
102102
<div className="app-container">
103103
<KernLogo />
104104
<div id="signup">
105-
<h2 className="title">{isFreeTrial ? 'Start your 14-day free trial' : 'Sign up for a local account'}</h2>
105+
<h2 className="title">{isManagedApp ? 'Start your 14-day free trial' : 'Sign up for a local account'}</h2>
106106
<Flow onSubmit={onSubmit} flow={initialFlow} />
107107
<div className="link-container">
108108
<a className="link" data-testid="forgot-password" href="/auth/login">Go back to login</a>

pkg/ui/NodeInputSubmit.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import { getNodeLabel } from "@ory/integrations/ui"
22
import { Button } from "@ory/themes"
33

44
import { NodeInputProps } from "./helpers"
5-
import { isFreeTrial } from "@/util/constants"
5+
import { isManagedApp } from "@/util/constants"
66

77

88
export function NodeInputSubmit<T>({
@@ -13,7 +13,7 @@ export function NodeInputSubmit<T>({
1313
return (
1414
<>
1515
{node.meta.label?.text == "Sign up" ? (<>
16-
{isFreeTrial ? (<>
16+
{isManagedApp ? (<>
1717
<div className="info-containter">
1818
<span>Once you register for an account, we’ll set up an organization for you - this is a manual step, but it usually only takes minutes.</span>
1919
<div>We’ll get back to you as soon as possible.</div>

util/constants.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
export const isFreeTrial = !(process.env.IS_OS === 'true' || process.env.IS_OS === '1');
1+
export const isManagedApp = process.env.IS_OS === 'false' || process.env.IS_OS === '0';
22
export const isDemoUser = process.env.IS_DEMO === 'true' || process.env.IS_DEMO === '1';

0 commit comments

Comments
 (0)