🎨(frontend) remove redundant React fragments

Remove unnecessary React fragments that contain only one child or are direct
children of HTML elements. Simplifies JSX structure by eliminating redundant
wrapper elements that don't add functional value.
This commit is contained in:
lebaudantoine
2025-06-30 18:03:20 +02:00
committed by aleb_the_flash
parent b058e6add9
commit 4a6b84ed50
4 changed files with 213 additions and 221 deletions

View File

@@ -7,7 +7,6 @@ export const OptionsButton = () => {
const { t } = useTranslation('rooms') const { t } = useTranslation('rooms')
return ( return (
<>
<Menu variant="dark"> <Menu variant="dark">
<Button <Button
square square
@@ -19,6 +18,5 @@ export const OptionsButton = () => {
</Button> </Button>
<OptionsMenuItems /> <OptionsMenuItems />
</Menu> </Menu>
</>
) )
} }

View File

@@ -247,7 +247,6 @@ export const EffectsConfiguration = ({
/> />
)} )}
{isSupported ? ( {isSupported ? (
<>
<div> <div>
<div> <div>
<H <H
@@ -375,7 +374,6 @@ export const EffectsConfiguration = ({
</div> </div>
</div> </div>
</div> </div>
</>
) : ( ) : (
<Information> <Information>
<Text variant="sm">{t('notAvailable')}</Text> <Text variant="sm">{t('notAvailable')}</Text>

View File

@@ -22,7 +22,6 @@ export function DesktopControlBar({
const browserSupportsScreenSharing = supportsScreenSharing() const browserSupportsScreenSharing = supportsScreenSharing()
const desktopControlBarEl = useRef<HTMLDivElement>(null) const desktopControlBarEl = useRef<HTMLDivElement>(null)
return ( return (
<>
<div <div
ref={desktopControlBarEl} ref={desktopControlBarEl}
className={css({ className={css({
@@ -91,6 +90,5 @@ export function DesktopControlBar({
</div> </div>
<MoreOptions parentElement={desktopControlBarEl} /> <MoreOptions parentElement={desktopControlBarEl} />
</div> </div>
</>
) )
} }

View File

@@ -15,7 +15,6 @@ export const Spinner = ({
return ( return (
<ProgressBar aria-label="Loading…" value={30}> <ProgressBar aria-label="Loading…" value={30}>
{({ percentage }) => ( {({ percentage }) => (
<>
<svg <svg
width={size} width={size}
height={size} height={size}
@@ -52,7 +51,6 @@ export const Spinner = ({
}} }}
/> />
</svg> </svg>
</>
)} )}
</ProgressBar> </ProgressBar>
) )