mirror of
https://github.com/Sendouc/sendou.ink.git
synced 2026-07-16 17:00:02 -05:00
show error on build filters if min > max
This commit is contained in:
parent
390a8af43d
commit
d8fcdca929
|
|
@ -45,14 +45,31 @@ const BuildFilters: React.FC<Props> = ({ filters, dispatch }) => {
|
|||
<Fragment key={filter.ability}>
|
||||
<Box mb="-1.2rem" />
|
||||
<Box mb="-1.2rem" />
|
||||
<Box mb="-1.2rem" fontSize="sm" color={gray} pr={2}>
|
||||
<Box
|
||||
mb="-1.2rem"
|
||||
fontSize="sm"
|
||||
color={
|
||||
filter.abilityPoints!.min > filter.abilityPoints!.max
|
||||
? "red.500"
|
||||
: gray
|
||||
}
|
||||
pr={2}
|
||||
>
|
||||
{isMainAbility(filter.ability) ? (
|
||||
<Trans>Included</Trans>
|
||||
) : (
|
||||
<Trans>Min AP</Trans>
|
||||
)}
|
||||
</Box>
|
||||
<Box mb="-1.2rem" fontSize="sm" color={gray}>
|
||||
<Box
|
||||
mb="-1.2rem"
|
||||
fontSize="sm"
|
||||
color={
|
||||
filter.abilityPoints!.min > filter.abilityPoints!.max
|
||||
? "red.500"
|
||||
: gray
|
||||
}
|
||||
>
|
||||
{isMainAbility(filter.ability) ? (
|
||||
<Trans>Excluded</Trans>
|
||||
) : (
|
||||
|
|
|
|||
|
|
@ -47,8 +47,22 @@ const BuildsPage = () => {
|
|||
boxShadow="md"
|
||||
color="black"
|
||||
>
|
||||
<Flex justifyContent="space-between">
|
||||
<Box visibility={data.length === 0 ? "hidden" : undefined}>
|
||||
<Flex
|
||||
justifyContent="space-between"
|
||||
fontSize="xs"
|
||||
textColor="black"
|
||||
textTransform="uppercase"
|
||||
letterSpacing="wider"
|
||||
lineHeight="1rem"
|
||||
fontWeight="medium"
|
||||
>
|
||||
<Box
|
||||
visibility={
|
||||
data.length === 0 && hiddenBuildCount === 0
|
||||
? "hidden"
|
||||
: undefined
|
||||
}
|
||||
>
|
||||
{data.length} <Trans>builds</Trans>{" "}
|
||||
{hiddenBuildCount > 0 && (
|
||||
<>
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user