Merge branch 'main' into 3-fix-aircraftmarkers-missionmarkers

This commit is contained in:
PxlLoewe
2025-04-29 21:42:10 -07:00
12 changed files with 70 additions and 91 deletions

View File

@@ -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);