diff --git a/src/ui/components/shared/NewWorkspaceModal/NewWorkspaceModal.tsx b/src/ui/components/shared/NewWorkspaceModal/NewWorkspaceModal.tsx index 7f47c5bda81..1940a56b199 100644 --- a/src/ui/components/shared/NewWorkspaceModal/NewWorkspaceModal.tsx +++ b/src/ui/components/shared/NewWorkspaceModal/NewWorkspaceModal.tsx @@ -20,6 +20,7 @@ import { isValidTeamName, validateEmail } from "ui/utils/helpers"; import { useConfirm } from "../Confirm"; import { TextInput } from "../Forms"; +import Checkbox from "../Forms/Checkbox"; import Modal from "../NewModal"; import { WorkspaceMembers } from "../WorkspaceSettingsModal/WorkspaceSettingsModal"; import InvitationLink from "./InvitationLink"; @@ -149,9 +150,11 @@ type SlideBodyProps = PropsFromRedux & { }; function SlideBody1({ hideModal, setNewWorkspace, setCurrent, total, current }: SlideBodyProps) { + const user = hooks.useGetUserInfo(); const [inputValue, setInputValue] = useState(""); const [inputError, setInputError] = useState(null); const [allowNext, setAllowNext] = useState(false); + const [createInternalTeam, setCreateInternalTeam] = useState(true); const textInputRef = useRef(null); const createNewWorkspace = hooks.useCreateNewWorkspace(onNewWorkspaceCompleted); @@ -182,7 +185,7 @@ function SlideBody1({ hideModal, setNewWorkspace, setCurrent, total, current }: createNewWorkspace({ variables: { name: inputValue, - planKey: "team-v1", + planKey: user.internal && createInternalTeam ? "team-internal-v1" : "team-v1", }, }); }; @@ -194,12 +197,19 @@ function SlideBody1({ hideModal, setNewWorkspace, setCurrent, total, current }: return ( <> - {/*
*/}
{inputError ?
{inputError}
: null}
- {/*
*/} + {user.internal ? ( +
+ setCreateInternalTeam(e.currentTarget.checked)} + /> + Create Internal Team without Trial +
+ ) : null}
{isValidTeamName(inputValue) ? (