Commit 2f799dc 1 parent 12cd34f commit 2f799dc Copy full SHA for 2f799dc
File tree 1 file changed +8
-0
lines changed
components/AIReplySection
1 file changed +8
-0
lines changed Original file line number Diff line number Diff line change 4
4
makeStyles ,
5
5
Popover ,
6
6
Typography ,
7
+ Snackbar ,
7
8
} from '@material-ui/core' ;
8
9
import cx from 'classnames' ;
9
10
import CloseIcon from '@material-ui/icons/Close' ;
@@ -92,6 +93,7 @@ function VoteButtons({ aiResponseId }: Props) {
92
93
] = useState < HTMLElement | null > ( null ) ;
93
94
const [ currentVote , setCurrentVote ] = useState < number > ( 0 ) ;
94
95
const [ comment , setComment ] = useState ( '' ) ;
96
+ const [ showThankYouSnack , setShowThankYouSnack ] = useState ( false ) ;
95
97
96
98
// Creates and updates score using the same ID
97
99
const scoreId = `${ aiResponseId } __${ aiReplyVoterId } ` ;
@@ -136,6 +138,7 @@ function VoteButtons({ aiResponseId }: Props) {
136
138
comment,
137
139
} ) ;
138
140
closeVotePopover ( ) ;
141
+ setShowThankYouSnack ( true ) ;
139
142
} ;
140
143
141
144
return (
@@ -205,6 +208,11 @@ function VoteButtons({ aiResponseId }: Props) {
205
208
</ Button >
206
209
</ div >
207
210
</ Popover >
211
+ < Snackbar
212
+ open = { showThankYouSnack }
213
+ onClose = { ( ) => setShowThankYouSnack ( false ) }
214
+ message = { t `Thank you for the feedback.` }
215
+ />
208
216
</ >
209
217
) ;
210
218
}
You can’t perform that action at this time.
0 commit comments