@@ -2,9 +2,7 @@ import type React from "react";
22import "./App.css" ;
33import { useViewModel } from "@element-hq/web-shared-components" ;
44import { useClientStoreContext } from "./context/ClientStoreContext" ;
5- import { RoomListHeader , RoomListSearch } from "./RoomList" ;
6- import { RoomListFiltersView } from "./RoomListFiltersView" ;
7- import { RoomListView } from "./RoomListView" ;
5+ import { RoomListHeader , RoomListSearch , RoomListView } from "./RoomList" ;
86import { RoomView } from "./RoomView" ;
97import { SidePanelView } from "./SidePanelView.tsx" ;
108import { SplashView } from "./SplashView.tsx" ;
@@ -19,17 +17,9 @@ export const Client: React.FC<ClientProps> = ({ onAddAccount }) => {
1917 const [ clientViewModel ] = useClientStoreContext ( ) ;
2018 const { roomListViewModel, roomViewModel } = useViewModel ( clientViewModel ) ;
2119
22- // Handle room changes
23- const handleRoomSelected = ( roomId : string ) => {
24- clientViewModel . setCurrentRoom ( roomId ) ;
25- } ;
26-
20+ // Room list view model must be available to render
2721 if ( ! roomListViewModel ) return null ;
2822
29- console . log (
30- `roomListViewModel: ${ roomListViewModel } , roomViewModel: ${ roomViewModel } ` ,
31- ) ;
32-
3323 return (
3424 < >
3525 < header className = "mx_Header" > </ header >
@@ -42,16 +32,8 @@ export const Client: React.FC<ClientProps> = ({ onAddAccount }) => {
4232 </ nav >
4333 < nav className = "mx_RoomList" >
4434 < RoomListSearch />
45- {
46- < >
47- < RoomListHeader />
48- < RoomListFiltersView vm = { roomListViewModel } />
49- < RoomListView
50- vm = { roomListViewModel }
51- onRoomSelected = { handleRoomSelected }
52- />
53- </ >
54- }
35+ < RoomListHeader />
36+ < RoomListView vm = { roomListViewModel } />
5537 </ nav >
5638 { roomViewModel ? (
5739 < RoomView roomViewModel = { roomViewModel } />
0 commit comments