.
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
import type { QueryClient } from "@tanstack/react-query";
|
||||
import { create } from "zustand";
|
||||
import { messageSchema, type ChannelId, type Message, type MessageId, type ServerId } from "~/lib/api/types";
|
||||
import { GATEWAY_URL } from "~/lib/consts";
|
||||
import { GatewayClient } from "~/lib/websocket/gateway/client";
|
||||
import { ConnectionState, EventType, type EventData, type VoiceServerUpdateEvent } from "~/lib/websocket/gateway/types";
|
||||
import { useChannelsVoiceStateStore } from "./channels-voice-state";
|
||||
@@ -9,8 +10,6 @@ import { useServerChannelsStore } from "./server-channels-store";
|
||||
import { useServerListStore } from "./server-list-store";
|
||||
import { useUsersStore } from "./users-store";
|
||||
|
||||
const GATEWAY_URL = "ws://localhost:12345/gateway/ws";
|
||||
|
||||
const HANDLERS = {
|
||||
[EventType.ADD_SERVER]: (self: GatewayState, data: Extract<EventData, { type: EventType.ADD_SERVER }>["data"]) => {
|
||||
useServerListStore.getState().addServer(data.server);
|
||||
|
||||
Reference in New Issue
Block a user