minor semantic fixes

This commit is contained in:
dan13ram
2021-07-26 20:13:17 +05:30
committed by dan13ram
parent 87fd8e11da
commit 9cf311062f
6 changed files with 10 additions and 16 deletions

View File

@@ -12,9 +12,7 @@ type Props = {
const getAdjacentTimezoneQueryVariables = (
defaultQueryVariables: GetPlayersQueryVariables,
): GetPlayersQueryVariables => {
const timezoneValue = defaultQueryVariables.timezones
? defaultQueryVariables.timezones[0]
: undefined;
const timezoneValue = defaultQueryVariables.timezones?.[0];
const timezone = TimezoneOptions.find((t) => t.value === timezoneValue);
const adjascentTimezones = timezone
? TimezoneOptions.filter(
@@ -72,14 +70,14 @@ export const AdjascentTimezonePlayers: React.FC<Props> = ({
spacing={{ base: '4', md: '8' }}
pt={{ base: '4', md: '8' }}
>
{error ? <Text>{`Error: ${error.message}`}</Text> : null}
{error ? <Text>Error: {error.message}</Text> : null}
{!error && players.length && (fetchingMore || !fetching) ? (
<>
<Flex
justify="space-between"
w="100%"
maxW="79rem"
pr="4"
pr={4}
align="center"
pb={{ base: 4, md: 0 }}
>

View File

@@ -245,7 +245,7 @@ export const PlayerFilter: React.FC<Props> = ({
{availability && (
<WrapItem>
<FilterTag
label={`Available >${availability.value} h/week`}
label={`Available ${availability.value} h/week`}
onRemove={() => {
setAvailability(null);
}}

View File

@@ -14,10 +14,10 @@ export const PlayersNotFound: React.FC = () => (
>
<Image src={PlayersNotFoundImage} />
<Text fontWeight="bold" fontSize="xl" textAlign="center">
No players found
No Players Found
</Text>
<Text textAlign="center">
It seems we cant find any players that match the filters you selected.
We cant find any players that match the filters you selected.
</Text>
</VStack>
);

View File

@@ -42,7 +42,7 @@ export const PlayerTile: React.FC<Props> = ({ player }) => {
const description = getPlayerDescription(player);
const displayDescription =
description && description.length > MAX_BIO_LENGTH
? `${description.substring(0, MAX_BIO_LENGTH - 9)}...`
? `${description.substring(0, MAX_BIO_LENGTH - 9)}`
: description;
return (
<MetaTile>

View File

@@ -116,7 +116,7 @@ const MorePlayers = React.forwardRef<HTMLDivElement, MorePlayersProps>(
<VStack w="100%" ref={ref}>
{fetching ? <LoadingState color="white" /> : null}
{!fetching && !isTimezoneSelected && totalCount > 0 ? (
<Text color="white">No more players available</Text>
<Text color="white">No more players available.</Text>
) : null}
{!fetching && totalCount === 0 ? <PlayersNotFound /> : null}
{!fetching && isTimezoneSelected ? (