Skip to content

Commit

Permalink
fix: tiles in view slider re-renders (#3166)
Browse files Browse the repository at this point in the history
  • Loading branch information
KaustubhKumar05 authored Aug 9, 2024
1 parent ca59cf6 commit cadc7ef
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 29 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ export const AppData = React.memo(() => {
? DEFAULT_TILES_IN_VIEW.MWEB
: Number(elements?.video_tile_layout?.grid?.tiles_in_view) || DEFAULT_TILES_IN_VIEW.DESKTOP,
};
hmsActions.setAppData(APP_DATA.uiSettings, updatedSettings, true);
hmsActions.setAppData(APP_DATA.uiSettings, updatedSettings, false);
}, [preferences, hmsActions, elements?.video_tile_layout, isMobile]);

useEffect(() => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,34 +41,6 @@ export const LayoutSettings = () => {

return (
<Box className={settingOverflow()}>
<Box>
{/* <Text variant="md" css={{ fontWeight: '$semiBold' }}>
Layout Modes
</Text>
<RadioGroup.Root
css={{ flexDirection: 'column', alignItems: 'start', gap: '$10', my: '$2', py: '$8' }}
value={layoutMode}
onValueChange={value =>
setUISettings({
[UI_SETTINGS.layoutMode]: value,
})
}
>
{Object.keys(LayoutMode).map(key => {
return (
<Flex align="center" key={key} css={{ mr: '$8', gap: '$8' }}>
<RadioGroup.Item value={LayoutMode[key as LayoutModeKeys]} id={`layoutMode-${key}`} css={{ mr: '$4' }}>
<RadioGroup.Indicator />
</RadioGroup.Item>
<Label htmlFor={`layoutMode-${key}`} css={{ display: 'flex', gap: '$8', cursor: 'pointer' }}>
{LayoutModeIconMapping[LayoutMode[key as LayoutModeKeys]]}
{LayoutMode[key as LayoutModeKeys]}
</Label>
</Flex>
);
})}
</RadioGroup.Root> */}
</Box>
<Flex align="center" css={{ w: '100%', my: '$2', py: '$8', '@md': { display: 'none' } }}>
<Text variant="md" css={{ fontWeight: '$semiBold' }}>
Tiles In View({maxTileCount})
Expand Down

0 comments on commit cadc7ef

Please sign in to comment.