diff --git a/webapp/channels/src/components/permissions_gates/system_permission_gate/__snapshots__/system_permission_gate.test.tsx.snap b/webapp/channels/src/components/permissions_gates/system_permission_gate/__snapshots__/system_permission_gate.test.tsx.snap index 0cee0f8eac..679188b6be 100644 --- a/webapp/channels/src/components/permissions_gates/system_permission_gate/__snapshots__/system_permission_gate.test.tsx.snap +++ b/webapp/channels/src/components/permissions_gates/system_permission_gate/__snapshots__/system_permission_gate.test.tsx.snap @@ -24,7 +24,6 @@ exports[`components/permissions_gates SystemPermissionGate should match snapshot { - public static defaultProps = { - invert: false, - }; - - render() { - if (this.props.hasPermission && !this.props.invert) { - return this.props.children; - } - if (!this.props.hasPermission && this.props.invert) { - return this.props.children; - } - return null; +const SystemPermissionGate = ({ + invert = false, + hasPermission, + children, +}: Props) => { + if (hasPermission !== invert) { + return <>{children}; } -} + return null; +}; + +export default SystemPermissionGate;