Another group update

This commit is contained in:
Bill 2022-03-14 06:41:50 -04:00
parent 9ec5f9f0de
commit 1322f92287
2 changed files with 5 additions and 5 deletions

View File

@ -1,14 +1,14 @@
import { GroupInformationParser, GroupRemoveMemberComposer } from '@nitrots/nitro-renderer'; import { GroupInformationParser, GroupRemoveMemberComposer } from '@nitrots/nitro-renderer';
import { FC, useCallback } from 'react'; import { FC, useCallback } from 'react';
import { CreateLinkEvent, GetGroupManager, GetGroupMembers, GetSessionDataManager, LocalizeText, NotificationUtilities, SendMessageComposer, TryJoinGroup, TryVisitRoom } from '../../../api'; import { CreateLinkEvent, GetGroupManager, GetGroupMembers, GetSessionDataManager, LocalizeText, NotificationUtilities, SendMessageComposer, TryJoinGroup, TryVisitRoom } from '../../../api';
import { Button, Column, Flex, Grid, LayoutBadgeImageView, Text } from '../../../common'; import { Button, Column, Flex, Grid, GridProps, LayoutBadgeImageView, Text } from '../../../common';
import { CatalogPageName } from '../../catalog/common/CatalogPageName'; import { CatalogPageName } from '../../catalog/common/CatalogPageName';
import { GroupMembershipType } from '../common/GroupMembershipType'; import { GroupMembershipType } from '../common/GroupMembershipType';
import { GroupType } from '../common/GroupType'; import { GroupType } from '../common/GroupType';
const STATES: string[] = [ 'regular', 'exclusive', 'private' ]; const STATES: string[] = [ 'regular', 'exclusive', 'private' ];
interface GroupInformationViewProps interface GroupInformationViewProps extends GridProps
{ {
groupInformation: GroupInformationParser; groupInformation: GroupInformationParser;
onJoin?: () => void; onJoin?: () => void;
@ -17,7 +17,7 @@ interface GroupInformationViewProps
export const GroupInformationView: FC<GroupInformationViewProps> = props => export const GroupInformationView: FC<GroupInformationViewProps> = props =>
{ {
const { groupInformation = null, onClose = null } = props; const { groupInformation = null, onClose = null, overflow = 'hidden', ...rest } = props;
const isRealOwner = (groupInformation && (groupInformation.ownerName === GetSessionDataManager().userName)); const isRealOwner = (groupInformation && (groupInformation.ownerName === GetSessionDataManager().userName));
@ -98,7 +98,7 @@ export const GroupInformationView: FC<GroupInformationViewProps> = props =>
if(!groupInformation) return null; if(!groupInformation) return null;
return ( return (
<Grid overflow="hidden"> <Grid overflow={ overflow } { ...rest }>
<Column center size={ 3 } overflow="hidden"> <Column center size={ 3 } overflow="hidden">
<Flex alignItems="center" overflow="hidden" className="group-badge"> <Flex alignItems="center" overflow="hidden" className="group-badge">
<LayoutBadgeImageView badgeCode={ groupInformation.badge } isGroup={ true } scale={ 2 } /> <LayoutBadgeImageView badgeCode={ groupInformation.badge } isGroup={ true } scale={ 2 } />

View File

@ -79,7 +79,7 @@ export const GroupsContainerView: FC<GroupsContainerViewProps> = props =>
}) } }) }
</AutoGrid> </AutoGrid>
</Column> </Column>
<Column size={ 10 }> <Column size={ 10 } overflow="hidden">
{ groupInformation && { groupInformation &&
<GroupInformationView groupInformation={ groupInformation } onClose={ onLeaveGroup } /> } <GroupInformationView groupInformation={ groupInformation } onClose={ onLeaveGroup } /> }
</Column> </Column>