Skip to content

Commit

Permalink
chore: replace Card on EngagementDashboard
Browse files Browse the repository at this point in the history
  • Loading branch information
juliajforesti committed Dec 6, 2023
1 parent 3437019 commit 22ef398
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 11 deletions.
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import { Box } from '@rocket.chat/fuselage';
import { Card, CardBody, CardCol, CardTitle } from '@rocket.chat/ui-client';
import { Box, Card, CardTitle, CardBody } from '@rocket.chat/fuselage';
import type { ReactElement, ReactNode } from 'react';
import React from 'react';

Expand All @@ -15,11 +14,9 @@ const EngagementDashboardCard = ({ children, title = undefined }: EngagementDash
<Card>
{title && <CardTitle>{title}</CardTitle>}
<CardBody>
<CardCol>
<EngagementDashboardCardErrorBoundary>
<Box>{children}</Box>
</EngagementDashboardCardErrorBoundary>
</CardCol>
<EngagementDashboardCardErrorBoundary>
<Box w='full'>{children}</Box>
</EngagementDashboardCardErrorBoundary>
</CardBody>
</Card>
</Box>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ type EngagementDashboardCardFilterProps = {
};

const EngagementDashboardCardFilter = ({ children = <InputBox.Skeleton /> }: EngagementDashboardCardFilterProps): ReactElement => (
<Box display='flex' justifyContent='flex-end' alignItems='center' wrap='no-wrap'>
<Box display='flex' justifyContent='flex-end' alignItems='center' wrap='no-wrap' pbe={8}>
{children && <Flex.Item grow={0}>{children}</Flex.Item>}
</Box>
);
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Box, Icon, Margins, Pagination, Skeleton, Table, TableBody, TableCell, TableHead, TableRow, Tile } from '@rocket.chat/fuselage';
import { Icon, Margins, Pagination, Skeleton, Table, TableBody, TableCell, TableHead, TableRow, Tile } from '@rocket.chat/fuselage';
import { useTranslation } from '@rocket.chat/ui-contexts';
import moment from 'moment';
import type { ReactElement } from 'react';
Expand Down Expand Up @@ -59,7 +59,7 @@ const ChannelsOverview = (): ReactElement => {
}
/>
</EngagementDashboardCardFilter>
<Box>
<div>
{channels && !channels.length && (
<Tile fontScale='p1' color='hint' style={{ textAlign: 'center' }}>
{t('No_data_found')}
Expand Down Expand Up @@ -127,7 +127,7 @@ const ChannelsOverview = (): ReactElement => {
onSetItemsPerPage={setItemsPerPage}
onSetCurrent={setCurrent}
/>
</Box>
</div>
</>
);
};
Expand Down

0 comments on commit 22ef398

Please sign in to comment.