mirror of
https://github.com/blitzkit/blitzkit.git
synced 2026-10-23 11:39:50 +02:00
feat: safe sort
This commit is contained in:
1 parent
4d99e61bfb
commit
f0fc23712a
13 files changed
+73
-65
No files matched your search
@@ -1,3 +1,4 @@
|
||||
import { TankFilters } from '../../stores/tankFilters';
|
||||
import { TankDefinition } from './tankDefinitions';
|
||||
|
||||
export function filterTank(filters: TankFilters, tank: TankDefinition) {
|
||||
|
||||
@@ -42,9 +42,9 @@ export function createNextSafeStore<Type>(initialState: Type) {
|
||||
|
||||
function useStore() {
|
||||
const store = useContext(Context);
|
||||
if (!store) {
|
||||
throw new Error('useStoreContext must be used within Provider');
|
||||
}
|
||||
|
||||
if (!store) throw new Error('useStore must be used within Provider');
|
||||
|
||||
return store;
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user