Commit 8298ac58 authored by isstuev's avatar isstuev

fixes

parent 607f5392
...@@ -2,6 +2,8 @@ import type { SystemStyleObject } from '@chakra-ui/react'; ...@@ -2,6 +2,8 @@ import type { SystemStyleObject } from '@chakra-ui/react';
import { Text, useColorModeValue } from '@chakra-ui/react'; import { Text, useColorModeValue } from '@chakra-ui/react';
import React from 'react'; import React from 'react';
const COUNTER_OVERLOAD = 50;
type Props = { type Props = {
count?: number; count?: number;
parentClassName: string; parentClassName: string;
...@@ -15,10 +17,9 @@ const TasCounter = ({ count, parentClassName }: Props) => { ...@@ -15,10 +17,9 @@ const TasCounter = ({ count, parentClassName }: Props) => {
return null; return null;
} }
const sx: SystemStyleObject = {}; const sx: SystemStyleObject = {
// eslint-disable-next-line @typescript-eslint/ban-ts-comment [`.${ parentClassName }:hover &`]: { color: 'inherit' },
// @ts-ignore: };
sx[`.${ parentClassName }:hover &`] = { color: 'inherit' };
return ( return (
<Text <Text
...@@ -29,7 +30,7 @@ const TasCounter = ({ count, parentClassName }: Props) => { ...@@ -29,7 +30,7 @@ const TasCounter = ({ count, parentClassName }: Props) => {
transitionDuration="normal" transitionDuration="normal"
transitionTimingFunction="ease" transitionTimingFunction="ease"
> >
{ count > 50 ? '50+' : count } { count > COUNTER_OVERLOAD ? `${ COUNTER_OVERLOAD }+` : count }
</Text> </Text>
); );
}; };
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment