Skip to content

Commit

Permalink
Merge pull request novuhq#965 from aggmoulik/novuhqgh-843-ui-settings…
Browse files Browse the repository at this point in the history
…-hmac

fix: HMAC Switch when switching environment
  • Loading branch information
scopsy authored Aug 7, 2022
2 parents e3f0db0 + bdf330a commit 6f1ecc9
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions apps/web/src/pages/settings/tabs/components/Security.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,9 @@ export const Security = () => {
>(updateWidgetSettings);

useEffect(() => {
if (environment?.widget?.notificationCenterEncryption) {
setIsHmacEnabled(environment.widget.notificationCenterEncryption);
}
}, []);
const isHmacEnabledEnv = environment?.widget?.notificationCenterEncryption ?? false;
setIsHmacEnabled(isHmacEnabledEnv);
}, [environment]);

async function handlerSwitchChange() {
const newIsHmacEnabled = !isHmacEnabled;
Expand Down

0 comments on commit 6f1ecc9

Please sign in to comment.