mirror of
https://github.com/blitzkit/blitzkit.git
synced 2026-10-23 19:49:50 +02:00
fix: dead code
This commit is contained in:
1 parent
25cee8a36b
commit
674abc4923
9 files changed
+169
-3525
No files matched your search
@@ -1,10 +0,0 @@
|
||||
import { type StoreKeys } from '@nanostores/react';
|
||||
import type { Store } from 'nanostores';
|
||||
import { useStoreKey } from './useStoreKey';
|
||||
|
||||
export function useStoreBoolean<Type>(
|
||||
store: Store<Type>,
|
||||
key: StoreKeys<Store<Type>>,
|
||||
) {
|
||||
return Boolean(useStoreKey(store, key));
|
||||
}
|
||||
@@ -1,10 +0,0 @@
|
||||
import { useStore, type StoreKeys } from '@nanostores/react';
|
||||
import type { Store } from 'nanostores';
|
||||
|
||||
export function useStoreKey<Type, Key extends StoreKeys<Store<Type>>>(
|
||||
store: Store<Type>,
|
||||
key: Key,
|
||||
) {
|
||||
const state = useStore(store, { keys: [key] });
|
||||
return state[key];
|
||||
}
|
||||
Reference in new issue
Block a user