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:
@@ -1,6 +1,7 @@
|
||||
import { ReactNode, useCallback } from 'react';
|
||||
import { matchPath, useLocation, useNavigate } from 'react-router-dom';
|
||||
import {
|
||||
decodeRouteParam,
|
||||
getDirectPath,
|
||||
getExplorePath,
|
||||
getHomePath,
|
||||
@@ -52,7 +53,10 @@ export function BackRouteHandler({ children }: BackRouteHandlerProps) {
|
||||
location.pathname
|
||||
);
|
||||
if (spaceMatch?.params.spaceIdOrAlias) {
|
||||
navigate(getSpacePath(spaceMatch.params.spaceIdOrAlias));
|
||||
const spaceIdOrAlias = decodeRouteParam(spaceMatch.params.spaceIdOrAlias);
|
||||
if (spaceIdOrAlias) {
|
||||
navigate(getSpacePath(spaceIdOrAlias));
|
||||
}
|
||||
return;
|
||||
}
|
||||
if (
|
||||
|
||||
Reference in New Issue
Block a user