File tree Expand file tree Collapse file tree 2 files changed +16
-16
lines changed Expand file tree Collapse file tree 2 files changed +16
-16
lines changed Original file line number Diff line number Diff line change @@ -17,7 +17,7 @@ interface ActionButtonsProps {
17
17
isCloneLoading : boolean ;
18
18
handleClone : ( name : string , id : string ) => void ;
19
19
mode : string ;
20
- handleUnpublish ? : ( ) => void ;
20
+ handleUnpublish : ( ) => void ;
21
21
isCloneDisabled : boolean ;
22
22
showOpenPlaygroundButton : boolean ;
23
23
showUnpublishAction : boolean ;
@@ -117,23 +117,17 @@ const ActionButtons: React.FC<ActionButtonsProps> = ({
117
117
</ LinkUrl >
118
118
) }
119
119
{ showUnpublishAction && (
120
- < LinkUrl
121
- style = { { width : '100%' } }
120
+ < UnpublishAction
121
+ sx = { {
122
+ borderRadius : '0.2rem' ,
123
+ gap : '10px' ,
124
+ width : '100%'
125
+ } }
122
126
onClick = { handleUnpublish }
123
- target = "_blank"
124
- rel = "noreferrer"
125
127
>
126
- < UnpublishAction
127
- sx = { {
128
- borderRadius : '0.2rem' ,
129
- gap : '10px' ,
130
- width : '100%'
131
- } }
132
- >
133
- < PublishIcon width = { 24 } height = { 24 } fill = { charcoal [ 10 ] } />
134
- Unpublish
135
- </ UnpublishAction >
136
- </ LinkUrl >
128
+ < PublishIcon width = { 24 } height = { 24 } fill = { charcoal [ 10 ] } />
129
+ Unpublish
130
+ </ UnpublishAction >
137
131
) }
138
132
</ StyledActionWrapper >
139
133
) ;
Original file line number Diff line number Diff line change @@ -22,6 +22,8 @@ interface LeftPanelProps {
22
22
technologySVGSubpath : string ;
23
23
fontFamily ?: string ;
24
24
showOpenPlaygroundButton ?: boolean ;
25
+ handleUnpublish : ( ) => void ;
26
+ showUnpublishAction ?: boolean ;
25
27
}
26
28
27
29
const LeftPanel : React . FC < LeftPanelProps > = ( {
@@ -31,13 +33,15 @@ const LeftPanel: React.FC<LeftPanelProps> = ({
31
33
actionItems = true ,
32
34
isCloneLoading,
33
35
handleClone,
36
+ handleUnpublish,
34
37
showTechnologies = true ,
35
38
mode,
36
39
filteredAcademyData,
37
40
isCloneDisabled,
38
41
technologySVGPath,
39
42
technologySVGSubpath,
40
43
fontFamily,
44
+ showUnpublishAction = false ,
41
45
showOpenPlaygroundButton = true
42
46
} ) => {
43
47
const theme = useTheme ( ) ;
@@ -77,6 +81,8 @@ const LeftPanel: React.FC<LeftPanelProps> = ({
77
81
cardId = { cardId }
78
82
isCloneLoading = { isCloneLoading }
79
83
handleClone = { handleClone }
84
+ showUnpublishAction = { showUnpublishAction }
85
+ handleUnpublish = { handleUnpublish }
80
86
mode = { mode }
81
87
isCloneDisabled = { isCloneDisabled }
82
88
showOpenPlaygroundButton = { showOpenPlaygroundButton }
You can’t perform that action at this time.
0 commit comments