Skip to content

Commit

Permalink
web: Fix socket shouldn't be stored in pinia store
Browse files Browse the repository at this point in the history
  • Loading branch information
bperel committed Dec 15, 2024
1 parent 1a2a2f1 commit 880a72b
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
7 changes: 5 additions & 2 deletions apps/web/src/pages/login.vue
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand All @@ -72,7 +75,7 @@ const login = async () => {
domain,
});
collectionSocket.value!.connect();
collectionSocket!.connect();
// const tmp = inject(socketInjectionKey)!;
// collectionSocket!.connect();
Expand Down
3 changes: 1 addition & 2 deletions apps/web/src/stores/collection.ts
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ export type purchaseWithStringDate = Omit<purchase, "date"> & {

export const collection = defineStore("collection", () => {
const {
collection: { services: collectionServices, socket: collectionSocket },
collection: { services: collectionServices },
stats: { services: statsServices },
auth: { services: authServices },
options: socketOptions,
Expand Down Expand Up @@ -356,7 +356,6 @@ export const collection = defineStore("collection", () => {
createPurchase,
deletePurchase,
hasRole,
collectionSocket,
hasSuggestions,
isLoadingUser,
coaIssueCountsByPublicationcode,
Expand Down

0 comments on commit 880a72b

Please sign in to comment.