Update usages of refs for React 19 compatibility (#29536)
* Update usages of refs for React 19 compatibility Signed-off-by: Michael Telatynski <7t3chguy@gmail.com> * Iterate Signed-off-by: Michael Telatynski <7t3chguy@gmail.com> * Iterate Signed-off-by: Michael Telatynski <7t3chguy@gmail.com> * Simplify Signed-off-by: Michael Telatynski <7t3chguy@gmail.com> --------- Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
This commit is contained in:
committed by
GitHub
parent
d7730f417b
commit
fac982811c
@@ -65,7 +65,9 @@ describe("FilePanel", () => {
|
||||
roomId={room.roomId}
|
||||
onClose={jest.fn()}
|
||||
resizeNotifier={new ResizeNotifier()}
|
||||
ref={(ref) => (filePanel = ref)}
|
||||
ref={(ref) => {
|
||||
filePanel = ref;
|
||||
}}
|
||||
/>,
|
||||
);
|
||||
await screen.findByText("No files visible in this room");
|
||||
|
||||
@@ -128,7 +128,7 @@ describe("RoomView", () => {
|
||||
cleanup();
|
||||
});
|
||||
|
||||
const mountRoomView = async (ref?: RefObject<RoomView>): Promise<RenderResult> => {
|
||||
const mountRoomView = async (ref?: RefObject<RoomView | null>): Promise<RenderResult> => {
|
||||
if (stores.roomViewStore.getRoomId() !== room.roomId) {
|
||||
const switchedRoom = new Promise<void>((resolve) => {
|
||||
const subFn = () => {
|
||||
|
||||
@@ -211,7 +211,9 @@ describe("TimelinePanel", () => {
|
||||
timelineSet={timelineSet}
|
||||
manageReadMarkers={true}
|
||||
manageReadReceipts={true}
|
||||
ref={(ref) => (timelinePanel = ref)}
|
||||
ref={(ref) => {
|
||||
timelinePanel = ref;
|
||||
}}
|
||||
/>,
|
||||
withClientContextRenderOptions(MatrixClientPeg.safeGet()),
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user