Fix React contexts (#12855)

This commit is contained in:
Michael Telatynski 2024-08-01 13:01:05 +01:00 committed by GitHub
parent 9b77279b3e
commit b6addb4118
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
35 changed files with 99 additions and 107 deletions

View file

@ -535,7 +535,7 @@ function createRightClickMenu(mxEvent: MatrixEvent, context?: Partial<IRoomState
function createMenuWithContent(
eventContent: object,
props?: Partial<React.ComponentProps<typeof MessageContextMenu>>,
props?: Partial<MessageContextMenu["props"]>,
context?: Partial<IRoomState>,
): RenderResult {
// XXX: We probably shouldn't be assuming all events are going to be message events, but considering this
@ -552,7 +552,7 @@ function makeDefaultRoom(): Room {
function createMenu(
mxEvent: MatrixEvent,
props?: Partial<React.ComponentProps<typeof MessageContextMenu>>,
props?: Partial<MessageContextMenu["props"]>,
context: Partial<IRoomState> = {},
beacons: Map<BeaconIdentifier, Beacon> = new Map(),
room: Room = makeDefaultRoom(),