Fix react function refs returning things

This is incompatible with React 19

Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
This commit is contained in:
Michael Telatynski 2024-12-06 11:37:57 +00:00
parent c299d2a0d1
commit 983db465c3
No known key found for this signature in database
GPG key ID: A2B008A5F49F5D0D
7 changed files with 47 additions and 25 deletions

View file

@ -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");

View file

@ -204,7 +204,9 @@ describe("TimelinePanel", () => {
timelineSet={timelineSet}
manageReadMarkers={true}
manageReadReceipts={true}
ref={(ref) => (timelinePanel = ref)}
ref={(ref) => {
timelinePanel = ref;
}}
/>,
);
await flushPromises();