Revert "feat: progress on tankopedia search"

This reverts commit c873c32d09.
This commit is contained in:
TrèsAbhi committed 2024-09-17 21:44:36 -05:00
1 parent a6f60ac0de
commit cf4fa83d44
10 files changed
+71 -62

No files matched your search

+15 -11
View File
@@ -1,5 +1,6 @@
import type { TankClass, Tier, TreeType } from '@blitzkit/core';
import { map } from 'nanostores';
import { TankClass, Tier, TreeType } from '@blitzkit/core';
import { create } from 'zustand';
import { createContextualSafeStore } from '../core/zustand/createContextualSafeStore';
export interface TankFilters {
tiers: Tier[];
@@ -11,12 +12,15 @@ export interface TankFilters {
searching: boolean;
}
export const $tankFilters = map<TankFilters>({
tiers: [],
nations: [],
classes: [],
types: [],
testing: 'include',
search: undefined,
searching: false,
});
export const { Provider, use, useMutation, useStore } =
createContextualSafeStore(() =>
create<TankFilters>()(() => ({
tiers: [],
nations: [],
classes: [],
types: [],
testing: 'include',
search: undefined,
searching: false,
})),
);
+10 -6
View File
@@ -1,5 +1,6 @@
import { map } from 'nanostores';
import type {
import { create } from 'zustand';
import { createContextualSafeStore } from '../core/zustand/createContextualSafeStore';
import {
TankopediaSortBy,
TankopediaSortDirection,
} from './tankopediaPersistent';
@@ -9,7 +10,10 @@ export interface TankopediaSort {
direction: TankopediaSortDirection;
}
export const $tankopediaSort = map<TankopediaSort>({
by: 'meta.none',
direction: 'descending',
});
export const { Provider, use, useMutation, useStore } =
createContextualSafeStore(() =>
create<TankopediaSort>()(() => ({
by: 'meta.none',
direction: 'descending',
})),
);