- {chatType === "broadcast" && currentChannel && (
+ {isBroadcast && currentChannel && (
)}
- {chatType === "direct" && node && (
+ {isDirect && otherNode && (
@@ -150,8 +153,9 @@ export const MessagesPage = () => {
diff --git a/src/tests/setupTests.ts b/src/tests/setupTests.ts
index 089c4c52..083acd8d 100644
--- a/src/tests/setupTests.ts
+++ b/src/tests/setupTests.ts
@@ -1,11 +1,9 @@
-import { expect, afterEach } from 'vitest';
+import { afterEach } from 'vitest';
import { cleanup } from '@testing-library/react';
-import * as matchers from '@testing-library/jest-dom/matchers';
+import { enableMapSet } from "immer";
import "@testing-library/jest-dom";
-// Enable auto mocks for our UI components
-//vi.mock('@components/UI/Dialog.tsx');
-//vi.mock('@components/UI/Typography/Link.tsx');
+enableMapSet();
globalThis.ResizeObserver = class {
observe() { }
diff --git a/vitest.config.ts b/vitest.config.ts
index cbf600bc..aaed988c 100644
--- a/vitest.config.ts
+++ b/vitest.config.ts
@@ -2,6 +2,8 @@ import path from "node:path";
import react from '@vitejs/plugin-react';
import { defineConfig } from 'vitest/config'
+import { enableMapSet } from "immer";
+enableMapSet();
export default defineConfig({
plugins: [
react(),