diff options
| author | Zephyrrus <[email protected]> | 2020-07-02 02:50:55 +0300 |
|---|---|---|
| committer | Zephyrrus <[email protected]> | 2020-07-02 02:50:55 +0300 |
| commit | 720ffaf0083564c85a07d66a6d303f34706add41 (patch) | |
| tree | 033405206c4dd981b32a76ba5033bec3692e8610 /src/site/pages/register.vue | |
| parent | chore: add compound launcher and basic prettier (diff) | |
| download | host.fuwn.me-720ffaf0083564c85a07d66a6d303f34706add41.tar.xz host.fuwn.me-720ffaf0083564c85a07d66a6d303f34706add41.zip | |
feat: start refactoring the code to actually use vuex
This includes creating multiple stores as needed for components and removing all complex states from components (since all those states should be stored in vuex)
Diffstat (limited to 'src/site/pages/register.vue')
| -rw-r--r-- | src/site/pages/register.vue | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/src/site/pages/register.vue b/src/site/pages/register.vue index c102abd..92eb35a 100644 --- a/src/site/pages/register.vue +++ b/src/site/pages/register.vue @@ -42,6 +42,8 @@ </template> <script> +import { mapState } from 'vuex'; + export default { name: 'Register', data() { @@ -52,11 +54,7 @@ export default { isLoading: false }; }, - computed: { - config() { - return this.$store.state.config; - } - }, + computed: mapState(['config', 'auth']), metaInfo() { return { title: 'Register' }; }, @@ -72,7 +70,7 @@ export default { } if (this.password !== this.rePassword) { this.$store.dispatch('alert', { - text: 'Passwords don\'t match', + text: "Passwords don't match", error: true }); return; |