Skip to content

Commit

Permalink
reload page after activation #427
Browse files Browse the repository at this point in the history
  • Loading branch information
io53 committed Aug 7, 2024
1 parent bcd8864 commit ca9cf8f
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/App.js
Original file line number Diff line number Diff line change
Expand Up @@ -274,7 +274,7 @@ export default function App() {
<AddSensorModal open={showDialog === "addsensor"} onClose={() => setShowDialog("")} updateApp={() => { setReloadSub(reloadSub + 1); forceUpdate() }} />
<SettingsModal open={showDialog === "settings"} onClose={() => setShowDialog("")} updateUI={() => this.forceUpdate()} />
{showDialog === "myaccount" &&
<MyAccountModal open={true} onClose={() => setShowDialog("")} updateApp={() => this.props.reloadTags()} />
<MyAccountModal open={true} onClose={() => setShowDialog("")} updateApp={() => { setReloadSub(reloadSub + 1); forceUpdate() }} />
}
</ChakraProvider>
);
Expand Down
5 changes: 4 additions & 1 deletion src/components/MyAccountModal.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,10 @@ function MyAccountModal(props) {
if (resp.result === "success") {
notify.success(resp.data.subscriptions[0].subscriptionName + " " + t("subscription_activated"))
setSubscriptions(resp.data.subscriptions)
props.updateApp()
setTimeout(() => {
window.location.reload();
}, 2000)
//props.updateApp()
} else if (resp.result === "error") {
notify.error(t(`UserApiError.${resp.code}`))
} else {
Expand Down

0 comments on commit ca9cf8f

Please sign in to comment.