mirror of
https://github.com/blitzkit/blitzkit.git
synced 2026-10-23 11:39:50 +02:00
fix: some linting for new proto 3
This commit is contained in:
1 parent
79bc259565
commit
f14ca394b5
29 files changed
+522
-418
No files matched your search
@@ -102,8 +102,8 @@ export type EmbedConfigItem = (
|
||||
pad?: boolean;
|
||||
};
|
||||
|
||||
export type EmbedState = Record<string, EmbedConfigItem['default']>;
|
||||
export type EmbedStateStore = Record<string, EmbedConfigItem['default']>;
|
||||
|
||||
export const { Provider, use, useMutation, useStore } = createContextualStore(
|
||||
(init: EmbedState) => create<EmbedState>()(() => init),
|
||||
export const EmbedState = createContextualStore((init: EmbedStateStore) =>
|
||||
create<EmbedStateStore>()(() => init),
|
||||
);
|
||||
@@ -1,11 +1,11 @@
|
||||
import type { TextProps } from '@radix-ui/themes';
|
||||
import type { EmbedConfig } from '.';
|
||||
import { EmbedState, type EmbedConfig, type ExtractEmbedConfigTypes } from '.';
|
||||
import type { EmbedConfigItemType, EmbedItemType } from './constants';
|
||||
|
||||
export function useEmbedStateCurry<Config extends EmbedConfig>() {
|
||||
function useState<Key extends keyof Config>(key: Key) {
|
||||
return EmbedState.use((state) => {
|
||||
return (state as EmbedState.ExtractEmbedConfigTypes<Config>)[key];
|
||||
return (state as ExtractEmbedConfigTypes<Config>)[key];
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
import type { TankClass, Tier, TreeType } from '@blitzkit/core';
|
||||
import type { TankClass, TankType, Tier } from '@blitzkit/core';
|
||||
import { map } from 'nanostores';
|
||||
|
||||
export interface TankFilters {
|
||||
tiers: Tier[];
|
||||
nations: string[];
|
||||
classes: TankClass[];
|
||||
types: TreeType[];
|
||||
types: TankType[];
|
||||
testing: 'include' | 'exclude' | 'only';
|
||||
search?: string;
|
||||
searching: boolean;
|
||||
|
||||
Reference in new issue
Block a user