Merged in feature/IO-3202-HasFeatureAccess-Boolean (pull request #2250)
IO-3202 HasFeatureAccess Boolean Approved-by: Dave Richer
This commit is contained in:
@@ -20,6 +20,7 @@ function FeatureWrapper({
|
|||||||
children,
|
children,
|
||||||
upsellComponent,
|
upsellComponent,
|
||||||
bypass,
|
bypass,
|
||||||
|
// eslint-disable-next-line no-unused-vars
|
||||||
...restProps
|
...restProps
|
||||||
}) {
|
}) {
|
||||||
const { t } = useTranslation();
|
const { t } = useTranslation();
|
||||||
@@ -78,7 +79,11 @@ export function HasFeatureAccess({ featureName, bodyshop, bypass, debug = false
|
|||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
return bodyshop?.features?.allAccess || dayjs(bodyshop?.features[featureName]).isAfter(dayjs());
|
return (
|
||||||
|
bodyshop?.features?.allAccess ||
|
||||||
|
bodyshop?.features?.[featureName] ||
|
||||||
|
dayjs(bodyshop?.features[featureName]).isAfter(dayjs())
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
export default connect(mapStateToProps, null)(FeatureWrapper);
|
export default connect(mapStateToProps, null)(FeatureWrapper);
|
||||||
|
|||||||
Reference in New Issue
Block a user