-
Notifications
You must be signed in to change notification settings - Fork 256
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
resolves #1031 #1040
resolves #1031 #1040
Conversation
and @Chriserus maybe you know how to replace the (this as any).$router here |
If anyone wants to test locally (on production or testnet (beware, testnet avax/polygon/oec are reaaaly slow)) change: cryptoblades/frontend/src/utils/common.ts Line 24 in 83dbbcb
const env = 'production' and in contracts.ts: ( cryptoblades/frontend/src/contracts.ts Lines 95 to 96 in 83dbbcb
comment L95 L96: const env='production'
|
frontend/src/views/Options.vue
Outdated
@@ -303,6 +303,12 @@ export default Vue.extend({ | |||
async setCurrentChain() { | |||
localStorage.setItem('currentChain', this.currentChain); | |||
Events.$emit('setting:currentChain', { value: this.currentChain }); | |||
(this as any).$router.replace( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There's a router being used in common.ts without as any
conversion. You could create and export a function in common.ts that will do router.replace
and call it from here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Checked it, should work, you can also change (this as any).$router that's in NftDisplay component
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@kcper @Chriserus Thanks, worked!
Changes in App.vue in router watcher:
Changes in Options.vue:
Changes in Common.ts:
Used router.replace the way I did to avoid a refresh and to avoid the redundant navigation warning from vue-router