feat: display flow count on per connection

This commit is contained in:
Ali BARIN
2022-08-13 01:39:41 +02:00
parent bb37299c5b
commit c1b637b284
3 changed files with 4 additions and 2 deletions

View File

@@ -14,6 +14,7 @@ export interface IConnection {
userId: string; userId: string;
verified: boolean; verified: boolean;
count: number; count: number;
flowCount: number;
createdAt: string; createdAt: string;
} }

View File

@@ -42,7 +42,7 @@ function AppConnectionRow(props: AppConnectionRowProps): React.ReactElement {
const [deleteConnection] = useMutation(DELETE_CONNECTION); const [deleteConnection] = useMutation(DELETE_CONNECTION);
const formatMessage = useFormatMessage(); const formatMessage = useFormatMessage();
const { id, key, formattedData, verified, createdAt } = props.connection; const { id, key, formattedData, verified, createdAt, flowCount } = props.connection;
const contextButtonRef = React.useRef<SVGSVGElement | null>(null); const contextButtonRef = React.useRef<SVGSVGElement | null>(null);
const [anchorEl, setAnchorEl] = React.useState<SVGSVGElement | null>(null); const [anchorEl, setAnchorEl] = React.useState<SVGSVGElement | null>(null);
@@ -121,7 +121,7 @@ function AppConnectionRow(props: AppConnectionRowProps): React.ReactElement {
<Box sx={{ px: 2 }}> <Box sx={{ px: 2 }}>
<Typography variant="caption" color="textSecondary" sx={{ display: ['none', 'inline-block'] }}> <Typography variant="caption" color="textSecondary" sx={{ display: ['none', 'inline-block'] }}>
{formatMessage('connection.flowCount', { count: countTranslation(0) })} {formatMessage('connection.flowCount', { count: countTranslation(flowCount) })}
</Typography> </Typography>
</Box> </Box>

View File

@@ -8,6 +8,7 @@ export const GET_APP_CONNECTIONS = gql`
id id
key key
verified verified
flowCount
formattedData { formattedData {
screenName screenName
} }