Skip to content

Commit d404311

Browse files
committed
fix(create-project): change privacy switch back to a checkbox
1 parent e454a7f commit d404311

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

components/projects/CreateProject/CreateProjectForm.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ import { type Resolve } from "../../../types";
3838
import { formatTierString } from "../../../utils/app/products";
3939
import { getErrorMessage } from "../../../utils/next/orvalError";
4040
import { FormikModalWrapper, type FormikModalWrapperProps } from "../../modals/FormikModalWrapper";
41-
import { PrivacySwitch } from "./PrivacySwitch";
41+
import { PrivacyToggle } from "./PrivacyToggle";
4242

4343
const PROJECT_SUB = ProductDetailType.DATA_MANAGER_PROJECT_TIER_SUBSCRIPTION;
4444

@@ -224,7 +224,7 @@ export const CreateProjectForm = ({
224224
)}
225225

226226
<Tooltip title="Toggle whether this project can be viewed by other platform users">
227-
<PrivacySwitch defaultPrivacy={defaultPrivacy} flavour={values.flavour} />
227+
<PrivacyToggle defaultPrivacy={defaultPrivacy} flavour={values.flavour} />
228228
</Tooltip>
229229

230230
{!modal && (

components/projects/CreateProject/PrivacySwitch.tsx renamed to components/projects/CreateProject/PrivacyToggle.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import {
55

66
import { FormControlLabel } from "@mui/material";
77
import { Field } from "formik";
8-
import { Switch } from "formik-mui";
8+
import { Checkbox } from "formik-mui";
99

1010
export interface PrivacySwitchProps {
1111
/**
@@ -18,7 +18,7 @@ export interface PrivacySwitchProps {
1818
defaultPrivacy: UnitDetailDefaultProductPrivacy;
1919
}
2020

21-
export const PrivacySwitch = ({ flavour, defaultPrivacy }: PrivacySwitchProps) => {
21+
export const PrivacyToggle = ({ flavour, defaultPrivacy }: PrivacySwitchProps) => {
2222
// Disable the switch if the product is an evaluation product or if the default privacy is set to
2323
// always private or always public
2424
const isDisabled =
@@ -28,7 +28,7 @@ export const PrivacySwitch = ({ flavour, defaultPrivacy }: PrivacySwitchProps) =
2828

2929
return (
3030
<FormControlLabel
31-
control={<Field color="primary" component={Switch} name="isPrivate" type="checkbox" />}
31+
control={<Field color="primary" component={Checkbox} name="isPrivate" type="checkbox" />}
3232
disabled={isDisabled}
3333
label="Private"
3434
labelPlacement="start"

0 commit comments

Comments
 (0)