fix: restore rooms and DMs after React Router 7 upgrade
Stop double-encoding Matrix IDs in pathUtils, decode route params on read, fix millify CJS import, and read space children from currentState so channels and joins work again.
This commit is contained in:
@@ -20,7 +20,7 @@ import { useMatrixClient } from '../../../hooks/useMatrixClient';
|
||||
import { RoomTopicViewer } from '../../../components/room-topic-viewer';
|
||||
import { RoomCard, RoomCardBase, RoomCardGrid } from '../../../components/room-card';
|
||||
import { ExploreServerPathSearchParams } from '../../paths';
|
||||
import { getExploreServerPath, withSearchParam } from '../../pathUtils';
|
||||
import { getExploreServerPath, decodeRouteParam, withSearchParam } from '../../pathUtils';
|
||||
import * as css from './style.css';
|
||||
import { allRoomsAtom } from '../../../state/room-list/roomList';
|
||||
import { useRoomNavigate } from '../../../hooks/useRoomNavigate';
|
||||
@@ -324,7 +324,8 @@ function LimitButton({ limit, onLimitChange }: LimitButtonProps) {
|
||||
}
|
||||
|
||||
export function PublicRooms() {
|
||||
const { server } = useParams();
|
||||
const { server: rawServer } = useParams();
|
||||
const server = decodeRouteParam(rawServer);
|
||||
const mx = useMatrixClient();
|
||||
const userId = mx.getUserId();
|
||||
const userServer = userId && getMxIdServer(userId);
|
||||
|
||||
Reference in New Issue
Block a user