File tree Expand file tree Collapse file tree 1 file changed +28
-16
lines changed
apps/web/src/components/interviews/questions/common Expand file tree Collapse file tree 1 file changed +28
-16
lines changed Original file line number Diff line number Diff line change @@ -61,6 +61,17 @@ export default function QuestionBookmarkAction({
61
61
}
62
62
63
63
const Icon = isBookmarked ? RiBookmarkFill : RiBookmarkLine ;
64
+ const bookmarkTooltip = isBookmarked
65
+ ? intl . formatMessage ( {
66
+ defaultMessage : 'Remove' ,
67
+ description : 'Tooltip to remove bookmark' ,
68
+ id : 'DY0cPB' ,
69
+ } )
70
+ : intl . formatMessage ( {
71
+ defaultMessage : 'Add to bookmark' ,
72
+ description : 'Tooltip to add bookmark' ,
73
+ id : 'LGi4p/' ,
74
+ } ) ;
64
75
65
76
const commonProps = {
66
77
href :
@@ -80,32 +91,33 @@ export default function QuestionBookmarkAction({
80
91
return < DropdownMenu . Item { ...commonProps } /> ;
81
92
}
82
93
94
+ if ( isFetching ) {
95
+ return (
96
+ < Button
97
+ addonPosition = "start"
98
+ isLabelHidden = { true }
99
+ size = "xs"
100
+ tooltip = { bookmarkTooltip }
101
+ variant = "secondary"
102
+ { ...commonProps }
103
+ className = "cursor-disabled"
104
+ onClick = { ( ) => { } }
105
+ />
106
+ ) ;
107
+ }
108
+
83
109
return (
84
110
< Button
85
111
addonPosition = "start"
86
112
isDisabled = {
87
- isFetching ||
88
- addBookmarkMutation . isLoading ||
89
- deleteBookmarkMutation . isLoading
113
+ addBookmarkMutation . isLoading || deleteBookmarkMutation . isLoading
90
114
}
91
115
isLabelHidden = { true }
92
116
isLoading = {
93
117
addBookmarkMutation . isLoading || deleteBookmarkMutation . isLoading
94
118
}
95
119
size = "xs"
96
- tooltip = {
97
- isBookmarked
98
- ? intl . formatMessage ( {
99
- defaultMessage : 'Remove' ,
100
- description : 'Tooltip to remove bookmark' ,
101
- id : 'DY0cPB' ,
102
- } )
103
- : intl . formatMessage ( {
104
- defaultMessage : 'Add to bookmark' ,
105
- description : 'Tooltip to add bookmark' ,
106
- id : 'LGi4p/' ,
107
- } )
108
- }
120
+ tooltip = { bookmarkTooltip }
109
121
variant = "secondary"
110
122
{ ...commonProps }
111
123
/>
You can’t perform that action at this time.
0 commit comments