Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F3119583
D4047.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
1 KB
Referenced Files
None
Subscribers
None
D4047.diff
View Options
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
Details
Attached
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)
Attached To
Mode
D4047: [web] Make `valid` prop of `EnumSettingsOptionInfo` optional
Attached
Detach File
Event Timeline
Log In to Comment