Skip to content

Commit

Permalink
fix popup rate start hiding if clicked
Browse files Browse the repository at this point in the history
  • Loading branch information
slavaleleka committed Jan 25, 2024
1 parent 0416c83 commit db4f5b5
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/popup/components/RatePopup/RatePopup.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ export const RatePopup = observer(() => {
await hideRate();
};

const handleChange = (e: React.ChangeEvent<HTMLInputElement>) => {
const handleChange = async (e: React.ChangeEvent<HTMLInputElement>) => {
const { value } = e.target;

if (value && parseInt(value, 10) >= 4) {
Expand All @@ -29,7 +29,9 @@ export const RatePopup = observer(() => {
window.open(FEEDBACK_URL, '_blank');
}

handleHideRate();
// wait until the message is sent to the background
// https://github.com/AdguardTeam/AdGuardVPNExtension/issues/150
await handleHideRate();

// close popup after click on rate star
window.close();
Expand Down

0 comments on commit db4f5b5

Please sign in to comment.