Merge branch 'main' into 3-fix-aircraftmarkers-missionmarkers
This commit is contained in:
@@ -21,7 +21,7 @@ interface ChatStore {
|
||||
addMessage: (userId: string, message: ChatMessage) => void;
|
||||
}
|
||||
|
||||
export const useChatStore = create<ChatStore>((set, get) => ({
|
||||
export const useLeftMenuStore = create<ChatStore>((set, get) => ({
|
||||
reportTabOpen: false,
|
||||
setReportTabOpen: (open: boolean) => set({ reportTabOpen: open }),
|
||||
ownId: null,
|
||||
@@ -99,7 +99,7 @@ export const useChatStore = create<ChatStore>((set, get) => ({
|
||||
socket.on(
|
||||
"chat-message",
|
||||
({ userId, message }: { userId: string; message: ChatMessage }) => {
|
||||
const store = useChatStore.getState();
|
||||
const store = useLeftMenuStore.getState();
|
||||
console.log("chat-message", userId, message);
|
||||
// Update the chat store with the new message
|
||||
store.addMessage(userId, message);
|
||||
Reference in New Issue
Block a user