File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -25,6 +25,8 @@ interface OverviewSectionProps {
2525 userProfile ?: any ;
2626 showShareAction : boolean ;
2727 handleShare : ( ) => void ;
28+ isVisibilityEnabled : boolean ;
29+ handleVisibilityChange : ( ) => void ;
2830}
2931
3032const OverviewSection : React . FC < OverviewSectionProps > = ( {
@@ -41,7 +43,9 @@ const OverviewSection: React.FC<OverviewSectionProps> = ({
4143 fontFamily,
4244 userProfile,
4345 showShareAction,
44- handleShare
46+ handleShare,
47+ isVisibilityEnabled,
48+ handleVisibilityChange
4549} ) => {
4650 return (
4751 < OverviewContainer >
@@ -64,6 +68,8 @@ const OverviewSection: React.FC<OverviewSectionProps> = ({
6468 handleCopyUrl = { handleCopyUrl }
6569 showShareAction = { showShareAction }
6670 handleShare = { handleShare }
71+ isVisibilityEnabled = { isVisibilityEnabled }
72+ handleVisibilityChange = { handleVisibilityChange }
6773 />
6874 </ div >
6975 < Grid container spacing = { 2 } >
Original file line number Diff line number Diff line change @@ -28,6 +28,8 @@ interface RightPanelProps {
2828 fetchingOrgError : boolean ;
2929 showShareAction : boolean ;
3030 handleShare : ( ) => void ;
31+ isVisibilityEnabled : boolean ;
32+ handleVisibilityChange : ( ) => void ;
3133}
3234
3335const RightPanel : React . FC < RightPanelProps > = ( {
@@ -51,7 +53,9 @@ const RightPanel: React.FC<RightPanelProps> = ({
5153 orgName,
5254 fetchingOrgError,
5355 showShareAction,
54- handleShare
56+ handleShare,
57+ isVisibilityEnabled = false ,
58+ handleVisibilityChange
5559} ) => {
5660 const cleanedType = type . replace ( 'my-' , '' ) . replace ( / s $ / , '' ) ;
5761 const { data : userProfile } = useGetUserProfileByIdQuery ( {
@@ -75,6 +79,8 @@ const RightPanel: React.FC<RightPanelProps> = ({
7579 userProfile = { userProfile }
7680 showShareAction = { showShareAction }
7781 handleShare = { handleShare }
82+ isVisibilityEnabled = { isVisibilityEnabled }
83+ handleVisibilityChange = { handleVisibilityChange }
7884 />
7985 { showCaveats && < CaveatsSection details = { details } /> }
8086 < RelatedDesigns
Original file line number Diff line number Diff line change @@ -29,6 +29,8 @@ interface SocialSharePopperProps {
2929 handleCopyUrl : ( type : string , name : string , id : string ) => void ;
3030 showShareAction : boolean ;
3131 handleShare : ( ) => void ;
32+ isVisibilityEnabled : boolean ;
33+ handleVisibilityChange : ( ) => void ;
3234}
3335
3436const SocialSharePopper : React . FC < SocialSharePopperProps > = ( {
@@ -38,7 +40,9 @@ const SocialSharePopper: React.FC<SocialSharePopperProps> = ({
3840 title,
3941 getUrl,
4042 handleCopyUrl,
41- handleShare
43+ handleShare,
44+ isVisibilityEnabled,
45+ handleVisibilityChange
4246} ) => {
4347 const theme = useTheme ( ) ;
4448 const [ anchorEl , setAnchorEl ] = useState < null | HTMLElement > ( null ) ;
@@ -59,8 +63,8 @@ const SocialSharePopper: React.FC<SocialSharePopperProps> = ({
5963 < CopyShareIconWrapper style = { { marginBottom : '2rem' } } >
6064 < VisibilityChipMenu
6165 value = { details ?. visibility as VIEW_VISIBILITY }
62- onChange = { ( ) => { } }
63- enabled = { false }
66+ onChange = { handleVisibilityChange }
67+ enabled = { isVisibilityEnabled }
6468 options = { [
6569 [ VIEW_VISIBILITY . PUBLIC , PublicIcon ] ,
6670 [ VIEW_VISIBILITY . PRIVATE , LockIcon ]
You can’t perform that action at this time.
0 commit comments