Tidy up React JSX to make Sonar happier (#33946)

* Eradicate unused React props

* Fix unmatched defaultProps

* Remove spurious React fragments

* Remove unused JSX

* Remove unused React state field

* Remove unused React state field

* Update snapshots
This commit is contained in:
Michael Telatynski
2026-06-23 16:40:42 +00:00
committed by GitHub
parent d1dfd3a7ca
commit a26732b040
60 changed files with 242 additions and 418 deletions
@@ -12,7 +12,6 @@ import { render, type RenderResult, screen } from "jest-matrix-react";
import { mocked } from "jest-mock";
import LeftPanel from "../../../../src/components/structures/LeftPanel";
import PageType from "../../../../src/PageTypes";
import ResizeNotifier from "../../../../src/utils/ResizeNotifier";
import { shouldShowComponent } from "../../../../src/customisations/helpers/UIComponents";
import { UIComponent } from "../../../../src/settings/UIFeature";
@@ -23,9 +22,7 @@ jest.mock("../../../../src/customisations/helpers/UIComponents", () => ({
describe("LeftPanel", () => {
function renderComponent(): RenderResult {
return render(
<LeftPanel isMinimized={false} pageType={PageType.RoomView} resizeNotifier={new ResizeNotifier()} />,
);
return render(<LeftPanel isMinimized={false} resizeNotifier={new ResizeNotifier()} />);
}
it("does not show filter container when disabled by UIComponent customisations", () => {