|
|
@ -24,6 +24,7 @@ export type OnShareSettingsUpdate = (options: { |
|
|
|
type ShareOptionsModalProps = { |
|
|
|
type ShareOptionsModalProps = { |
|
|
|
onClose: () => void; |
|
|
|
onClose: () => void; |
|
|
|
visibility: AllowedRoadmapVisibility; |
|
|
|
visibility: AllowedRoadmapVisibility; |
|
|
|
|
|
|
|
isDiscoverable?: boolean; |
|
|
|
sharedFriendIds?: string[]; |
|
|
|
sharedFriendIds?: string[]; |
|
|
|
sharedTeamMemberIds?: string[]; |
|
|
|
sharedTeamMemberIds?: string[]; |
|
|
|
teamId?: string; |
|
|
|
teamId?: string; |
|
|
@ -37,6 +38,7 @@ export function ShareOptionsModal(props: ShareOptionsModalProps) { |
|
|
|
const { |
|
|
|
const { |
|
|
|
roadmapId, |
|
|
|
roadmapId, |
|
|
|
onClose, |
|
|
|
onClose, |
|
|
|
|
|
|
|
isDiscoverable: defaultIsDiscoverable = false, |
|
|
|
visibility: defaultVisibility, |
|
|
|
visibility: defaultVisibility, |
|
|
|
sharedTeamMemberIds: defaultSharedMemberIds = [], |
|
|
|
sharedTeamMemberIds: defaultSharedMemberIds = [], |
|
|
|
sharedFriendIds: defaultSharedFriendIds = [], |
|
|
|
sharedFriendIds: defaultSharedFriendIds = [], |
|
|
@ -57,7 +59,7 @@ export function ShareOptionsModal(props: ShareOptionsModalProps) { |
|
|
|
const membersCache = useMemo(() => new Map<string, TeamMemberList[]>(), []); |
|
|
|
const membersCache = useMemo(() => new Map<string, TeamMemberList[]>(), []); |
|
|
|
|
|
|
|
|
|
|
|
const [visibility, setVisibility] = useState(defaultVisibility); |
|
|
|
const [visibility, setVisibility] = useState(defaultVisibility); |
|
|
|
const [isDiscoverable, setIsDiscoverable] = useState(false); |
|
|
|
const [isDiscoverable, setIsDiscoverable] = useState(defaultIsDiscoverable); |
|
|
|
const [sharedTeamMemberIds, setSharedTeamMemberIds] = useState<string[]>( |
|
|
|
const [sharedTeamMemberIds, setSharedTeamMemberIds] = useState<string[]>( |
|
|
|
defaultSharedMemberIds |
|
|
|
defaultSharedMemberIds |
|
|
|
); |
|
|
|
); |
|
|
|