fixed ui bug with count display

This commit is contained in:
dan13ram
2021-07-07 20:41:48 +05:30
committed by Alec LaLonde
parent e0416c1396
commit cd6ab4118e
2 changed files with 4 additions and 1 deletions

View File

@@ -88,6 +88,7 @@ const styles: typeof selectStyles = {
type Props = {
fetching: boolean;
fetchingMore: boolean;
aggregates: PlayerAggregates;
queryVariables: GetPlayersQueryVariables;
setQueryVariable: QueryVariableSetter;
@@ -97,6 +98,7 @@ type Props = {
export const PlayerFilter: React.FC<Props> = ({
fetching,
fetchingMore,
aggregates,
queryVariables,
setQueryVariable,
@@ -376,7 +378,7 @@ export const PlayerFilter: React.FC<Props> = ({
</Button>
</Flex>
)}
{!fetching && (
{(fetchingMore ? totalCount > 0 : !fetching) && (
<Flex justify="space-between" w="100%" maxW="80rem" px="4">
<Text fontWeight="bold" fontSize="xl" w="100%" maxW="79rem">
{`${totalCount} player${totalCount === 1 ? '' : 's'}`}

View File

@@ -74,6 +74,7 @@ const Players: React.FC<Props> = () => {
<VStack w="100%" spacing="8" pb={{ base: '16', lg: '0' }}>
<PlayerFilter
fetching={fetching}
fetchingMore={fetchingMore}
aggregates={aggregates}
queryVariables={queryVariables}
setQueryVariable={setQueryVariable}