diff --git a/src/components/sidebar/ServerListItem.vue b/src/components/sidebar/ServerListItem.vue index 8557ab6..ebf11bd 100644 --- a/src/components/sidebar/ServerListItem.vue +++ b/src/components/sidebar/ServerListItem.vue @@ -15,8 +15,7 @@ --> @@ -36,15 +35,14 @@ export default defineComponent({ }, computed: { - currentServer(): string | undefined { - return useStore().state.currentServer ? useStore().state.currentServer.id : undefined; + currentServer: { + get() { + return useStore().state.currentServer; + }, + set(value) { + useStore().commit(MutationTypes.SET_CURRENT_SERVER, value.id); + } } }, - - methods: { - setCurrentServer(serverId: string) { - useStore().commit(MutationTypes.SET_CURRENT_SERVER, serverId); - } - } });