Page MenuHomePhabricator

D4047.diff
No OneTemporary

D4047.diff

diff --git a/web/modals/threads/notifications/enum-settings-option-info.react.js b/web/modals/threads/notifications/enum-settings-option-info.react.js
--- a/web/modals/threads/notifications/enum-settings-option-info.react.js
+++ b/web/modals/threads/notifications/enum-settings-option-info.react.js
@@ -7,7 +7,7 @@
import css from './enum-settings-option-info.css';
type Props = {
- +valid: boolean,
+ +valid: ?boolean,
+children: React.Node,
};
@@ -17,15 +17,17 @@
const optionInfoClasses = React.useMemo(
() =>
classnames(css.optionInfo, {
- [css.optionInfoInvalid]: !valid,
+ [css.optionInfoInvalid]: valid === false,
}),
[valid],
);
- const icon = React.useMemo(
- () => <SWMansionIcon icon={valid ? 'check' : 'cross'} size={12} />,
- [valid],
- );
+ const icon = React.useMemo(() => {
+ if (valid === undefined || valid === null) {
+ return;
+ }
+ return <SWMansionIcon icon={valid ? 'check' : 'cross'} size={12} />;
+ }, [valid]);
return (
<div className={optionInfoClasses}>
{icon}
diff --git a/web/modals/threads/notifications/enum-settings-option.react.js b/web/modals/threads/notifications/enum-settings-option.react.js
--- a/web/modals/threads/notifications/enum-settings-option.react.js
+++ b/web/modals/threads/notifications/enum-settings-option.react.js
@@ -12,7 +12,7 @@
+onSelect: () => void,
+icon: React.Node,
+title: string,
- +description: $ReadOnlyArray<[string, boolean]>,
+ +description: $ReadOnlyArray<[string, ?boolean]>,
};
function EnumSettingsOption(props: Props): React.Node {

File Metadata

Mime Type
text/plain
Expires
Sat, Nov 2, 2:25 AM (22 h, 2 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2404822
Default Alt Text
D4047.diff (1 KB)

Event Timeline