mirror of
https://github.com/muerwre/orchidmap-front.git
synced 2025-04-25 02:56:41 +07:00
fixed min-max problem
This commit is contained in:
parent
1d45e65434
commit
a19555b429
1 changed files with 1 additions and 1 deletions
|
@ -15,7 +15,7 @@ const MapListDialogHead: FC<Props> = memo(
|
||||||
({ min, max, ready, distance, search, onSearchChange, onDistanceChange }) => {
|
({ min, max, ready, distance, search, onSearchChange, onDistanceChange }) => {
|
||||||
const marks = useMemo(
|
const marks = useMemo(
|
||||||
() =>
|
() =>
|
||||||
[...new Array(Math.floor((max - min) / 25) + 1)].reduce(
|
[...new Array(Math.floor((Math.max(min, max) - Math.max(min, max)) / 25) + 1)].reduce(
|
||||||
(obj, el, i) => ({
|
(obj, el, i) => ({
|
||||||
...obj,
|
...obj,
|
||||||
[min + i * 25]: min + i * 25 < 200 ? ` ${min + i * 25}` : ` ${min + i * 25}+`,
|
[min + i * 25]: min + i * 25 < 200 ? ` ${min + i * 25}` : ` ${min + i * 25}+`,
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue