Skip to content

Saleor Core: the high performance, composable, headless commerce API.

Refactor a bit

dominik-zegleneed80794cddc
diff --git a/saleor/static/dashboard-next/components/ControlledCheckbox.tsx b/saleor/static/dashboard-next/components/ControlledCheckbox.tsx
index 0a5abf9938..ffbf554814 100644
--- a/saleor/static/dashboard-next/components/ControlledCheckbox.tsx
+++ b/saleor/static/dashboard-next/components/ControlledCheckbox.tsx
@@ -17,7 +17,7 @@ export const ControlledCheckbox: React.StatelessComponent<
disabled={disabled}
control={
<Checkbox
- checked={checked || false}
+ checked={checked}
color="primary"
name={name}
onChange={() => onChange({ target: { name, value: !checked } })}
diff --git a/saleor/static/dashboard-next/customers/components/CustomerDetailsPage/CustomerDetailsPage.tsx b/saleor/static/dashboard-next/customers/components/CustomerDetailsPage/CustomerDetailsPage.tsx
index 8838cdff77..1641f69689 100644
--- a/saleor/static/dashboard-next/customers/components/CustomerDetailsPage/CustomerDetailsPage.tsx
+++ b/saleor/static/dashboard-next/customers/components/CustomerDetailsPage/CustomerDetailsPage.tsx
@@ -66,7 +66,7 @@ const CustomerDetailsPage = withStyles(styles, { name: "CustomerDetailsPage" })(
errors={errors}
initial={{
email: maybe(() => customer.email),
- isActive: maybe(() => customer.isActive),
+ isActive: maybe(() => customer.isActive, false),
note: maybe(() => customer.note)
}}
onSubmit={onSubmit}