mirror of
https://github.com/blitzkit/blitzkit.git
synced 2026-10-26 12:09:50 +01:00
feat: upgrade TankSort
This commit is contained in:
1 parent
87b6a36520
commit
4efdaaf7c9
9 files changed
+39
-42
No files matched your search
@@ -22,7 +22,7 @@ import { useLocale } from '../../hooks/useLocale';
|
||||
import { $tankFilters } from '../../stores/tankFilters';
|
||||
import { TankopediaPersistent } from '../../stores/tankopediaPersistent';
|
||||
import { SORT_UNITS } from '../../stores/tankopediaPersistent/constants';
|
||||
import { $tankopediaSort } from '../../stores/tankopediaSort';
|
||||
import { TankSort } from '../../stores/tankopediaSort';
|
||||
import type { MaybeSkeletonComponentProps } from '../../types/maybeSkeletonComponentProps';
|
||||
import { ExperimentIcon } from '../ExperimentIcon';
|
||||
import { TankSearchCard } from './components/Card';
|
||||
@@ -58,7 +58,7 @@ export const TankSearch = memo<TankSearchProps>(
|
||||
const mutateTankopediaPersistent = TankopediaPersistent.useMutation();
|
||||
const awaitedTanksDefinitionsArray = Object.values(tankDefinitions.tanks);
|
||||
const tankFilters = useStore($tankFilters);
|
||||
const tankopediaSort = useStore($tankopediaSort);
|
||||
const tankopediaSort = TankSort.use();
|
||||
const tanksFiltered = useMemo(() => {
|
||||
if (tankFilters.search === null) {
|
||||
const filtered = awaitedTanksDefinitionsArray.filter((tank) =>
|
||||
|
||||
Reference in new issue
Block a user