0
+ ? `${numberOfSelectedChannels} ${pluralize('channel', numberOfSelectedChannels)} selected`
+ : 'Select a channel'
+ }
+ />
>
) : (
@@ -232,22 +229,24 @@ const SlackSharingPermissions = React.memo(() => {
secondaryLabel: 'All workspace members will have access to any chat created from any channel.'
},
// {
- // label: 'Channel',
+ // label: 'Channel',
// value: 'shareWithChannel',
// secondaryLabel: 'All channel members will have access to any chat created from that channel.'
// },
{
label: 'None',
- value: 'noSharing',
+ value: 'noSharing',
secondaryLabel: 'Only the user who sent the request will have access to their chat.'
}
];
- const selectedOption: SlackSharingPermission = slackIntegration?.integration?.default_sharing_permissions || 'noSharing';
- const selectedLabel = sharingOptions.find(option => option.value === selectedOption)?.label || 'Select option';
+ const selectedOption: SlackSharingPermission =
+ slackIntegration?.integration?.default_sharing_permissions || 'noSharing';
+ const selectedLabel =
+ sharingOptions.find((option) => option.value === selectedOption)?.label || 'Select option';
const handleSelect = useMemoizedFn((value: string) => {
- updateSlackIntegration({
+ updateSlackIntegration({
default_sharing_permissions: value as SlackSharingPermission
});
});
@@ -266,15 +265,23 @@ const SlackSharingPermissions = React.memo(() => {
align="end"
side="bottom"
selectType="single">
-
- {selectedLabel}
-
-
-
-
+
);
});
SlackSharingPermissions.displayName = 'SlackSharingPermissions';
+
+const WeirdFakeSelectButtonForBlake = ({ label }: { label: string }) => {
+ return (
+
+
+ {label}
+
+
+
+
+
+ );
+};