|
|
@ -16,6 +16,7 @@ import { cn } from '../../lib/classname'; |
|
|
|
import type { UserTeamItem } from '../TeamDropdown/TeamDropdown'; |
|
|
|
import type { UserTeamItem } from '../TeamDropdown/TeamDropdown'; |
|
|
|
|
|
|
|
|
|
|
|
export type OnShareSettingsUpdate = (options: { |
|
|
|
export type OnShareSettingsUpdate = (options: { |
|
|
|
|
|
|
|
isDiscoverable: boolean; |
|
|
|
visibility: AllowedRoadmapVisibility; |
|
|
|
visibility: AllowedRoadmapVisibility; |
|
|
|
sharedTeamMemberIds: string[]; |
|
|
|
sharedTeamMemberIds: string[]; |
|
|
|
sharedFriendIds: string[]; |
|
|
|
sharedFriendIds: string[]; |
|
|
@ -123,7 +124,7 @@ export function ShareOptionsModal(props: ShareOptionsModalProps) { |
|
|
|
|
|
|
|
|
|
|
|
setIsLoading(false); |
|
|
|
setIsLoading(false); |
|
|
|
setIsSettingsUpdated(true); |
|
|
|
setIsSettingsUpdated(true); |
|
|
|
onShareSettingsUpdate({ sharedFriendIds, visibility, sharedTeamMemberIds }); |
|
|
|
onShareSettingsUpdate({ isDiscoverable, sharedFriendIds, visibility, sharedTeamMemberIds }); |
|
|
|
}; |
|
|
|
}; |
|
|
|
|
|
|
|
|
|
|
|
const handleTransferToTeam = useCallback( |
|
|
|
const handleTransferToTeam = useCallback( |
|
|
@ -329,6 +330,7 @@ export function ShareOptionsModal(props: ShareOptionsModalProps) { |
|
|
|
disabled={isUpdateDisabled || isLoading} |
|
|
|
disabled={isUpdateDisabled || isLoading} |
|
|
|
onClick={() => { |
|
|
|
onClick={() => { |
|
|
|
handleShareChange({ |
|
|
|
handleShareChange({ |
|
|
|
|
|
|
|
isDiscoverable, |
|
|
|
visibility, |
|
|
|
visibility, |
|
|
|
sharedTeamMemberIds: |
|
|
|
sharedTeamMemberIds: |
|
|
|
visibility === 'team' ? sharedTeamMemberIds : [], |
|
|
|
visibility === 'team' ? sharedTeamMemberIds : [], |
|
|
|