diff --git a/apps/web/src/pages/login.vue b/apps/web/src/pages/login.vue index 6e9fb05e3..e12e0614b 100644 --- a/apps/web/src/pages/login.vue +++ b/apps/web/src/pages/login.vue @@ -53,7 +53,10 @@ meta: import Cookies from "js-cookie"; const { login: userLogin, loadUser } = collection(); -const { user, collectionSocket } = storeToRefs(collection()); +const { user } = storeToRefs(collection()); +const { + collection: { socket: collectionSocket }, +} = inject(socketInjectionKey)!; let router = useRouter(); let route = useRoute(); @@ -72,7 +75,7 @@ const login = async () => { domain, }); - collectionSocket.value!.connect(); + collectionSocket!.connect(); // const tmp = inject(socketInjectionKey)!; // collectionSocket!.connect(); diff --git a/apps/web/src/stores/collection.ts b/apps/web/src/stores/collection.ts index dac475930..9ca9a1b18 100644 --- a/apps/web/src/stores/collection.ts +++ b/apps/web/src/stores/collection.ts @@ -39,7 +39,7 @@ export type purchaseWithStringDate = Omit & { export const collection = defineStore("collection", () => { const { - collection: { services: collectionServices, socket: collectionSocket }, + collection: { services: collectionServices }, stats: { services: statsServices }, auth: { services: authServices }, options: socketOptions, @@ -356,7 +356,6 @@ export const collection = defineStore("collection", () => { createPurchase, deletePurchase, hasRole, - collectionSocket, hasSuggestions, isLoadingUser, coaIssueCountsByPublicationcode,