File tree Expand file tree Collapse file tree 1 file changed +15
-13
lines changed
client/src/components/home/shared Expand file tree Collapse file tree 1 file changed +15
-13
lines changed Original file line number Diff line number Diff line change @@ -109,20 +109,22 @@ export default function AskQuestion() {
109109 location : location ,
110110 topic : topic ,
111111 } ) ,
112- ) . then ( ( res ) => {
113- if ( res . status === 200 && res . data . message === 'cooldown_violation' ) {
114- setTimePassed ( Math . round ( res . data . timePassed ) ) ;
115- setShowCooldownOverlay ( true ) ;
116- } else {
117- clearValues ( ) ;
118- }
119-
120- if ( res . status === 200 ) {
121- manuallyGetNewData ( ) ;
122- }
112+ )
113+ . then ( ( res ) => {
114+ if ( res . status === 200 && res . data . message === 'cooldown_violation' ) {
115+ setTimePassed ( Math . round ( res . data . timePassed ) ) ;
116+ setShowCooldownOverlay ( true ) ;
117+ } else {
118+ clearValues ( ) ;
119+ }
123120
124- setAskDisabled ( false ) ;
125- } ) ;
121+ if ( res . status === 200 ) {
122+ manuallyGetNewData ( ) ;
123+ }
124+ } )
125+ . finally ( ( ) => {
126+ setAskDisabled ( false ) ;
127+ } ) ;
126128 }
127129
128130 const manuallyGetNewData = ( ) => {
You can’t perform that action at this time.
0 commit comments