mirror of
https://github.com/blitzkit/blitzkit.git
synced 2026-10-23 11:39:50 +02:00
Revert "feat: progress on tankopedia search"
This reverts commit c873c32d09.
This commit is contained in:
1 parent
6288e3f69a
commit
4c5ad23edf
10 files changed
+71
-62
No files matched your search
@@ -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,
|
||||
})),
|
||||
);
|
||||
@@ -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',
|
||||
})),
|
||||
);
|
||||
Reference in new issue
Block a user