stream day 3

This commit is contained in:
Zoe
2023-01-05 19:16:43 -06:00
parent c55cf2867b
commit 108bb6d6fb
11 changed files with 257 additions and 63 deletions

View File

@@ -2,14 +2,19 @@ export const useServerStore = defineStore('server', {
state: () => ({
servers: [],
dms: [],
activeServer: undefined
activeServer: {}
}),
actions: {
addServer(server) {
if (this.servers.includes(server)) return;
this.servers.push(server)
},
addDM(server) {
if (this.dms.includes(server)) return;
this.dms.push(server)
}
},
setActive(type, serverId) {
this.activeServer = this[type].find((e) => e.id === serverId)
},
},
})