Skip to content

Commit

Permalink
fix: add ContextualbarTitle
Browse files Browse the repository at this point in the history
  • Loading branch information
dougfabris committed Apr 1, 2024
1 parent 68f541c commit 867ab1f
Showing 1 changed file with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ import {
ContextualbarContent,
ContextualbarClose,
ContextualbarEmptyContent,
ContextualbarTitle,
} from '../../../../components/Contextualbar';
import { VirtuosoScrollbars } from '../../../../components/CustomScrollbars';
import { goToRoomById } from '../../../../lib/utils/goToRoomById';
Expand Down Expand Up @@ -40,27 +41,26 @@ function DiscussionsList({
text,
onChangeFilter,
}: DiscussionsListProps) {
const showRealNames = Boolean(useSetting('UI_Use_Real_Name'));

const t = useTranslation();
const showRealNames = useSetting<boolean>('UI_Use_Real_Name') || false;
const inputRef = useAutoFocus(true);

const onClick = useCallback((e) => {
const { drid } = e.currentTarget.dataset;
goToRoomById(drid);
}, []);

const { ref, contentBoxSize: { inlineSize = 378, blockSize = 1 } = {} } = useResizeObserver<HTMLElement>({
debounceDelay: 200,
});

return (
<>
<ContextualbarHeader>
<ContextualbarIcon name='discussion' />
<Box flexShrink={1} flexGrow={1} withTruncatedText mi={8}>
{t('Discussions')}
</Box>
<ContextualbarTitle>{t('Discussions')}</ContextualbarTitle>
<ContextualbarClose onClick={onClose} />
</ContextualbarHeader>

<ContextualbarContent paddingInline={0} ref={ref}>
<Box
display='flex'
Expand Down

0 comments on commit 867ab1f

Please sign in to comment.